[function]基础功能
This commit is contained in:
parent
481e22455a
commit
9cd5a9d273
|
|
@ -52,4 +52,5 @@ dependencies {
|
||||||
implementation 'com.github.felHR85:UsbSerial:6.1.0'
|
implementation 'com.github.felHR85:UsbSerial:6.1.0'
|
||||||
implementation 'androidx.paging:paging-runtime:3.0.0-alpha07'
|
implementation 'androidx.paging:paging-runtime:3.0.0-alpha07'
|
||||||
implementation 'com.tencent:mmkv-static:1.2.7'
|
implementation 'com.tencent:mmkv-static:1.2.7'
|
||||||
|
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
|
||||||
}
|
}
|
||||||
|
|
@ -35,6 +35,11 @@ const val TOKEN = "token"
|
||||||
*/
|
*/
|
||||||
const val TIMING = "timing"
|
const val TIMING = "timing"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定数计时
|
||||||
|
*/
|
||||||
|
const val NUMBER = "number"
|
||||||
|
|
||||||
const val TIMING_NAME = "定时计数(秒)"
|
const val TIMING_NAME = "定时计数(秒)"
|
||||||
|
|
||||||
const val NUMBER_NAME = "定数计数(个)"
|
const val NUMBER_NAME = "定数计数(个)"
|
||||||
|
|
|
||||||
|
|
@ -153,13 +153,13 @@ public class NetActivity extends BaseActivity {
|
||||||
AddActivityReqBean bean = new AddActivityReqBean();
|
AddActivityReqBean bean = new AddActivityReqBean();
|
||||||
bean.setName("test001");
|
bean.setName("test001");
|
||||||
bean.setActivityType("timing");
|
bean.setActivityType("timing");
|
||||||
bean.setValue(60);
|
// bean.setValue(60);
|
||||||
bean.setGroupID("77bba9124a4281bc9f92f965561cd5");
|
bean.setGroupID("77bba9124a4281bc9f92f965561cd5");
|
||||||
bean.setPersonNumber(6);
|
// bean.setPersonNumber(6);
|
||||||
bean.setStep(2);
|
bean.setStep(2);
|
||||||
concise.request(NetActivity.this, concise.api.addActivity(bean), new CallBack<BaseBean<List<AddActivityBean>>>() {
|
concise.request(NetActivity.this, concise.api.addActivity(bean), new CallBack<BaseBean<AddActivityBean>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(BaseBean<List<AddActivityBean>> listBaseBean) {
|
public void onSuccess(BaseBean<AddActivityBean> listBaseBean) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,21 @@ package com.skipping.activity.home
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.widget.LinearLayout
|
import android.view.DragEvent
|
||||||
import android.widget.TextView
|
import android.view.View
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
|
import androidx.drawerlayout.widget.DrawerLayout
|
||||||
import androidx.recyclerview.widget.GridLayoutManager
|
import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import com.google.android.material.navigation.NavigationView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
import com.libs.fragment.BaseActivity
|
import com.libs.fragment.BaseActivity
|
||||||
import com.libs.utils.ActivityManager
|
import com.libs.utils.ActivityManager
|
||||||
import com.libs.utils.LogUtil
|
import com.libs.utils.LogUtil
|
||||||
|
import com.libs.utils.ToastUtil
|
||||||
|
import com.skipping.NUMBER
|
||||||
import com.skipping.R
|
import com.skipping.R
|
||||||
|
import com.skipping.TIMING
|
||||||
import com.skipping.activity.perform.PerformActivity
|
import com.skipping.activity.perform.PerformActivity
|
||||||
import com.skipping.activity.setting.SettingActivity
|
import com.skipping.activity.setting.SettingActivity
|
||||||
import com.skipping.net.ActivityBean
|
import com.skipping.net.ActivityBean
|
||||||
|
|
@ -32,6 +38,9 @@ import kotlinx.android.synthetic.main.activity_home.*
|
||||||
class HomeActivity : BaseActivity<HomePresenter>() {
|
class HomeActivity : BaseActivity<HomePresenter>() {
|
||||||
lateinit var classList: List<GradleBean>
|
lateinit var classList: List<GradleBean>
|
||||||
lateinit var bubbleWindow: BubbleWindow
|
lateinit var bubbleWindow: BubbleWindow
|
||||||
|
var choseCla: GradleBean? = null
|
||||||
|
lateinit var adaper: HomeGridAdaper
|
||||||
|
var position = 0
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun startHome(activity: Activity) {
|
fun startHome(activity: Activity) {
|
||||||
|
|
@ -61,6 +70,73 @@ class HomeActivity : BaseActivity<HomePresenter>() {
|
||||||
choseClass.setOnClickListener {
|
choseClass.setOnClickListener {
|
||||||
bubbleWindow.show(chooseIV)
|
bubbleWindow.show(chooseIV)
|
||||||
}
|
}
|
||||||
|
cancel_btn.setOnClickListener {
|
||||||
|
drawerlayout.closeDrawer(GravityCompat.START)
|
||||||
|
}
|
||||||
|
drawerlayout.addDrawerListener(object : DrawerLayout.DrawerListener {
|
||||||
|
override fun onDrawerSlide(drawerView: View, slideOffset: Float) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDrawerOpened(drawerView: View) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDrawerClosed(drawerView: View) {
|
||||||
|
chooseIV.text = "选择"
|
||||||
|
choseCla = null
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDrawerStateChanged(newState: Int) {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
ok_btn.setOnClickListener {
|
||||||
|
if (choseCla == null) {
|
||||||
|
ToastUtil.longToast("请选择班级")
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
drawerlayout.closeDrawer(GravityCompat.START)
|
||||||
|
var title: String
|
||||||
|
if (position == 0) {
|
||||||
|
title = TIMING
|
||||||
|
} else {
|
||||||
|
title = NUMBER
|
||||||
|
}
|
||||||
|
p.addActivity(activityNameEdit.text.toString(), title, homeNum.text.toString(), homeAll.text.toString(), choseCla?.groupID!!)
|
||||||
|
}
|
||||||
|
|
||||||
|
timeRL.setOnClickListener {
|
||||||
|
if (position == 0) {
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
position = 0
|
||||||
|
timeTV.setTextColor(ContextCompat.getColor(this, R.color.black))
|
||||||
|
timeTV.setBackgroundResource(R.drawable.left_clicked)
|
||||||
|
numTV.setTextColor(ContextCompat.getColor(this, R.color.white))
|
||||||
|
numTV.setBackgroundResource(R.drawable.right_unclicked)
|
||||||
|
homeTitle.text = "跳绳时间(秒)"
|
||||||
|
}
|
||||||
|
|
||||||
|
numRL.setOnClickListener {
|
||||||
|
if (position == 1) {
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
position = 1
|
||||||
|
timeTV.setTextColor(ContextCompat.getColor(this, R.color.white))
|
||||||
|
timeTV.setBackgroundResource(R.drawable.left_unclicked)
|
||||||
|
numTV.setTextColor(ContextCompat.getColor(this, R.color.black))
|
||||||
|
numTV.setBackgroundResource(R.drawable.right_clicked)
|
||||||
|
homeTitle.text = "跳绳数量"
|
||||||
|
}
|
||||||
|
|
||||||
|
refreshLayout.setOnRefreshListener { p.getActivityList() }
|
||||||
|
|
||||||
|
recyclerview.addOnScrollListener(object : RecyclerView.OnScrollListener() {
|
||||||
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
|
refreshLayout.setEnabled(recyclerView.getChildCount() == 0 || recyclerView.getChildAt(0).getTop() >= 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun initStart() {
|
override fun initStart() {
|
||||||
|
|
@ -69,12 +145,20 @@ class HomeActivity : BaseActivity<HomePresenter>() {
|
||||||
|
|
||||||
|
|
||||||
fun showList(list: List<ActivityBean>) {
|
fun showList(list: List<ActivityBean>) {
|
||||||
recyclerview.layoutManager = GridLayoutManager(this, 3)
|
if(refreshLayout.isRefreshing){
|
||||||
val adaper = HomeGridAdaper(this, list)
|
refreshLayout.isRefreshing = false
|
||||||
adaper.setOnItemClickListener {
|
|
||||||
PerformActivity.startActivity(this, it.id.toString(), DateUtils.dealDateFormat(it.createdAt))
|
|
||||||
}
|
}
|
||||||
recyclerview.adapter = adaper
|
if (!::adaper.isInitialized) {
|
||||||
|
recyclerview.layoutManager = GridLayoutManager(this, 3)
|
||||||
|
adaper = HomeGridAdaper(this, list)
|
||||||
|
adaper.setOnItemClickListener {
|
||||||
|
PerformActivity.startActivity(this, it.id.toString(), DateUtils.dealDateFormat(it.createdAt))
|
||||||
|
}
|
||||||
|
recyclerview.adapter = adaper
|
||||||
|
} else {
|
||||||
|
adaper.setData(list)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun showClassList(list: List<GradleBean>) {
|
fun showClassList(list: List<GradleBean>) {
|
||||||
|
|
@ -85,13 +169,18 @@ class HomeActivity : BaseActivity<HomePresenter>() {
|
||||||
}
|
}
|
||||||
}.setOnItemClick(object : OnItemClick {
|
}.setOnItemClick(object : OnItemClick {
|
||||||
override fun onClick(tag: String?, position: Int, bubbleWindow: BubbleWindow?) {
|
override fun onClick(tag: String?, position: Int, bubbleWindow: BubbleWindow?) {
|
||||||
|
choseCla = list[position]
|
||||||
|
chooseIV.text = list[position].groupName + "班"
|
||||||
activityNameEdit?.setText(list[position].groupName + "班活动")
|
activityNameEdit?.setText(list[position].groupName + "班活动")
|
||||||
bubbleWindow?.dismiss()
|
bubbleWindow?.dismiss()
|
||||||
}
|
}
|
||||||
}).setMargining(com.libs.utils.ScreenUtil.getActionBarHeight(this))
|
}).setMargining(com.libs.utils.ScreenUtil.getActionBarHeight(this))
|
||||||
.setDirection(Direction.BOTTOM)
|
.setDirection(Direction.BOTTOM)
|
||||||
.build()
|
.build()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun addActivityResult() {
|
||||||
|
p.getActivityList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,14 @@ class HomeGridAdaper(context: Context, list: List<ActivityBean>) : RecyclerView.
|
||||||
var list = list
|
var list = list
|
||||||
var context = context
|
var context = context
|
||||||
lateinit var onClick: (bean: ActivityBean) -> Unit
|
lateinit var onClick: (bean: ActivityBean) -> Unit
|
||||||
|
|
||||||
|
|
||||||
|
fun setData(list: List<ActivityBean>) {
|
||||||
|
this.list = list
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HomeGridAdaper.Holder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HomeGridAdaper.Holder {
|
||||||
return Holder(LayoutInflater.from(context).inflate(R.layout.grid_item, parent, false))
|
return Holder(LayoutInflater.from(context).inflate(R.layout.grid_item, parent, false))
|
||||||
}
|
}
|
||||||
|
|
@ -54,8 +62,4 @@ class HomeGridAdaper(context: Context, list: List<ActivityBean>) : RecyclerView.
|
||||||
fun setOnItemClickListener(onClick: (bean: ActivityBean) -> Unit) {
|
fun setOnItemClickListener(onClick: (bean: ActivityBean) -> Unit) {
|
||||||
this.onClick = onClick
|
this.onClick = onClick
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnClick {
|
|
||||||
fun onClick(bean: ActivityBean)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
package com.skipping.activity.home
|
package com.skipping.activity.home
|
||||||
|
|
||||||
import android.os.Parcel
|
import android.text.Editable
|
||||||
import android.os.Parcelable
|
|
||||||
import com.libs.fragment.BasePresenter
|
import com.libs.fragment.BasePresenter
|
||||||
import com.libs.network.CallBack
|
import com.libs.network.CallBack
|
||||||
import com.libs.network.Concise
|
import com.libs.network.Concise
|
||||||
|
import com.libs.utils.LogUtil
|
||||||
import com.libs.utils.ToastUtil
|
import com.libs.utils.ToastUtil
|
||||||
import com.skipping.ACCOUNT
|
import com.skipping.ACCOUNT
|
||||||
import com.skipping.BASE_URL
|
import com.skipping.BASE_URL
|
||||||
|
|
@ -26,7 +26,7 @@ class HomePresenter() : BasePresenter<HomeActivity>() {
|
||||||
fun getActivityList() {
|
fun getActivityList() {
|
||||||
val bean = ActivityReqBean()
|
val bean = ActivityReqBean()
|
||||||
bean.index = 1
|
bean.index = 1
|
||||||
bean.pageSize = 9
|
bean.pageSize = 12
|
||||||
concise.request(v, concise.api.getActivityList(bean), object : CallBack<BaseBean<List<ActivityBean>>> {
|
concise.request(v, concise.api.getActivityList(bean), object : CallBack<BaseBean<List<ActivityBean>>> {
|
||||||
override fun onSuccess(k: BaseBean<List<ActivityBean>>?) {
|
override fun onSuccess(k: BaseBean<List<ActivityBean>>?) {
|
||||||
if (k != null) {
|
if (k != null) {
|
||||||
|
|
@ -52,4 +52,27 @@ class HomePresenter() : BasePresenter<HomeActivity>() {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun addActivity(name: String, type: String, number: String, value: String, groupID: String) {
|
||||||
|
var bean = AddActivityReqBean()
|
||||||
|
bean.name = name
|
||||||
|
bean.activityType = type
|
||||||
|
bean.personNumber = number.toInt()
|
||||||
|
bean.value = value.toInt()
|
||||||
|
bean.step = 2
|
||||||
|
bean.groupID = groupID
|
||||||
|
concise.request(v, concise.api.addActivity(bean), object : CallBack<BaseBean<AddActivityBean>> {
|
||||||
|
override fun onSuccess(k: BaseBean<AddActivityBean>?) {
|
||||||
|
if (k?.code == 0) {
|
||||||
|
v.addActivityResult()
|
||||||
|
} else {
|
||||||
|
ToastUtil.longToast(k?.msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailed(e: Throwable?) {
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +56,7 @@ public interface API {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@POST("activity/create")
|
@POST("activity/create")
|
||||||
Observable<BaseBean<List<AddActivityBean>>> addActivity(@Body AddActivityReqBean addActivityReqBean);
|
Observable<BaseBean<AddActivityBean>> addActivity(@Body AddActivityReqBean addActivityReqBean);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 活动详情
|
* 活动详情
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,16 @@ import java.util.List;
|
||||||
* @author Ming
|
* @author Ming
|
||||||
* 3/15/22
|
* 3/15/22
|
||||||
*/
|
*/
|
||||||
public class AddActivityBean implements Serializable {
|
public class AddActivityBean{
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ID : 14
|
* ID : 22
|
||||||
* ActivityName : test001
|
* ActivityName : 测试5
|
||||||
* ActivityType : timing
|
* ActivityType : timing
|
||||||
* ActivityValue : 60
|
* ActivityValue : 100
|
||||||
* Step : 2
|
* Step : 2
|
||||||
* Candidates : [[{"PersonID":"4414550b40b38fd171ba2e319dc2","Name":"xiaowang","StudentID":"1005","Score":0,"Detail":[]},{"PersonID":"8d34508b457780a298efba2a9c28","Name":"xiaohua","StudentID":"1006","Score":0,"Detail":[]}]]
|
* Candidates : [[{"PersonID":"329b20b046f5888bcd5165d115f1","Name":"xiaofang","StudentID":"1002","Score":0,"Detail":[]},{"PersonID":"4557de13408aaf9057752285c81a","Name":"xiaohai","StudentID":"1003","Score":0,"Detail":[]},{"PersonID":"4dee38df466fa8469f0e62f672fb","Name":"xiaoli","StudentID":"1004","Score":0,"Detail":[]},{"PersonID":"a12e6f5a4383855caa2bd36958a2","Name":"xiaoming","StudentID":"1001","Score":0,"Detail":[]}]]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
@ -89,9 +90,9 @@ public class AddActivityBean implements Serializable {
|
||||||
|
|
||||||
public static class CandidatesBean implements Serializable {
|
public static class CandidatesBean implements Serializable {
|
||||||
/**
|
/**
|
||||||
* PersonID : 4414550b40b38fd171ba2e319dc2
|
* PersonID : 329b20b046f5888bcd5165d115f1
|
||||||
* Name : xiaowang
|
* Name : xiaofang
|
||||||
* StudentID : 1005
|
* StudentID : 1002
|
||||||
* Score : 0
|
* Score : 0
|
||||||
* Detail : []
|
* Detail : []
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -11,79 +11,89 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<LinearLayout
|
||||||
android:id="@+id/appbarlayout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:theme="@style/AppTheme.AppBarOverlay">
|
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
<LinearLayout
|
android:id="@+id/appbarlayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="130dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/color_2C2C2C"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
android:theme="@style/AppTheme.AppBarOverlay">
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="40dp"
|
|
||||||
android:paddingRight="40dp">
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="130dp"
|
||||||
android:text="xxxxxx学校"
|
android:background="@color/color_2C2C2C"
|
||||||
android:textColor="@color/white"
|
android:gravity="center_vertical"
|
||||||
android:textSize="28dp" />
|
android:orientation="horizontal"
|
||||||
|
android:paddingLeft="40dp"
|
||||||
<View
|
android:paddingRight="40dp">
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/create_activity"
|
|
||||||
android:layout_width="300dp"
|
|
||||||
android:layout_height="85dp"
|
|
||||||
android:background="@drawable/btn_bg"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="创建活动"
|
android:text="xxxxxx学校"
|
||||||
android:textColor="@color/color_3d3d3d"
|
android:textColor="@color/white"
|
||||||
android:textSize="36dp"
|
android:textSize="28dp" />
|
||||||
android:textStyle="bold" />
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<ImageView
|
<View
|
||||||
android:id="@+id/setting_btn"
|
android:layout_width="0dp"
|
||||||
android:layout_width="80dp"
|
android:layout_height="0dp"
|
||||||
android:layout_height="80dp"
|
android:layout_weight="1" />
|
||||||
android:layout_marginLeft="40dp"
|
|
||||||
android:src="@mipmap/setting" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<RelativeLayout
|
||||||
android:id="@+id/recyclerview"
|
android:id="@+id/create_activity"
|
||||||
|
android:layout_width="300dp"
|
||||||
|
android:layout_height="85dp"
|
||||||
|
android:background="@drawable/btn_bg"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="创建活动"
|
||||||
|
android:textColor="@color/color_3d3d3d"
|
||||||
|
android:textSize="36dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/setting_btn"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_marginLeft="40dp"
|
||||||
|
android:src="@mipmap/setting" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||||
|
android:id="@+id/refreshLayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content">
|
||||||
android:background="@color/color_F6F6F6"/>
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
android:id="@+id/recyclerview"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_F6F6F6" />
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.navigation.NavigationView
|
<com.google.android.material.navigation.NavigationView
|
||||||
android:id="@+id/nav_view"
|
android:id="@+id/nav_view"
|
||||||
android:layout_width="560dp"
|
android:layout_width="560dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_gravity="start"
|
android:layout_gravity="start"
|
||||||
android:background="@color/color_2C2C2C"
|
android:background="@color/color_2C2C2C"
|
||||||
android:fitsSystemWindows="true" >
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -131,11 +141,11 @@
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/choseClass"
|
android:id="@+id/choseClass"
|
||||||
android:padding="20dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal"
|
||||||
|
android:padding="20dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/chooseIV"
|
android:id="@+id/chooseIV"
|
||||||
|
|
@ -148,7 +158,7 @@
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="18dp"
|
android:layout_width="18dp"
|
||||||
android:layout_height="12dp"
|
android:layout_height="12dp"
|
||||||
android:layout_marginLeft="5dp"
|
android:layout_marginLeft="15dp"
|
||||||
android:layout_marginRight="60dp"
|
android:layout_marginRight="60dp"
|
||||||
android:src="@mipmap/down" />
|
android:src="@mipmap/down" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
@ -191,11 +201,13 @@
|
||||||
android:textSize="20dp" />
|
android:textSize="20dp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/homeNum"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
|
android:inputType="number"
|
||||||
android:paddingTop="10dp"
|
android:paddingTop="10dp"
|
||||||
android:paddingBottom="10dp"
|
android:paddingBottom="10dp"
|
||||||
android:text="8"
|
android:text="8"
|
||||||
|
|
@ -235,37 +247,62 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginTop="30dp">
|
android:layout_marginTop="10dp">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/timeRL"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingLeft="30dp"
|
||||||
|
android:paddingTop="30dp"
|
||||||
|
android:paddingBottom="30dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/timeTV"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@drawable/left_clicked"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="定时计数"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="20dp" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/numRL"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="30dp"
|
||||||
|
android:paddingRight="30dp"
|
||||||
|
android:paddingBottom="30dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/numTV"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@drawable/right_unclicked"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="定数计时"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="20dp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@drawable/left_clicked"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="定时计数"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="20dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:background="@drawable/right_unclicked"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="定数计时"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="20dp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/homeTitle"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="60dp"
|
android:layout_marginLeft="60dp"
|
||||||
android:layout_marginTop="30dp"
|
android:layout_marginTop="10dp"
|
||||||
android:text="跳绳数量"
|
android:text="跳绳数量"
|
||||||
android:textColor="@color/color_70_E6E6E6"
|
android:textColor="@color/color_70_E6E6E6"
|
||||||
android:textSize="20dp" />
|
android:textSize="20dp" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
|
android:id="@+id/homeAll"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="60dp"
|
android:layout_marginLeft="60dp"
|
||||||
|
|
@ -294,6 +331,7 @@
|
||||||
android:gravity="center_horizontal">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/cancel_btn"
|
||||||
android:layout_width="140dp"
|
android:layout_width="140dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:background="@drawable/cancel"
|
android:background="@drawable/cancel"
|
||||||
|
|
@ -307,6 +345,7 @@
|
||||||
android:layout_height="0dp" />
|
android:layout_height="0dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/ok_btn"
|
||||||
android:layout_width="140dp"
|
android:layout_width="140dp"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:background="@drawable/ok"
|
android:background="@drawable/ok"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue