parent
1f67fba393
commit
a9d2f5aedd
23 changed files with 708 additions and 112 deletions
@ -0,0 +1,3 @@ |
||||
package com.project.survey.logic.bean |
||||
|
||||
data class ListResult<T>(val rows: List<T>, val totalCount: Int) |
@ -0,0 +1,83 @@ |
||||
package com.project.survey.logic.viewmodel |
||||
|
||||
import androidx.lifecycle.LiveData |
||||
import androidx.lifecycle.MutableLiveData |
||||
import com.project.survey.constants.SPConstants |
||||
import com.project.survey.logic.bean.ListResult |
||||
import com.project.survey.model.ApprovalBean |
||||
import com.project.survey.model.ControlNetBean |
||||
import com.project.survey.model.ControlNetCGBean |
||||
import com.project.survey.model.ProjectBean |
||||
import com.project.survey.network.RetrofitClient |
||||
import com.project.survey.util.SPUtils |
||||
|
||||
class ControlNetViewModel : BaseViewModel() { |
||||
|
||||
val api = RetrofitClient.createApiService() |
||||
|
||||
|
||||
val controlNetListResponse: LiveData<ListResult<ControlNetBean>> |
||||
get() = _controlNetListResponse |
||||
private val _controlNetListResponse = MutableLiveData<ListResult<ControlNetBean>>() |
||||
|
||||
/** |
||||
* 获取专用控制网列表 |
||||
*/ |
||||
fun fetchSpecialControlNetList(j_query: String, page: Int = 1) { |
||||
launch { |
||||
val res = |
||||
api.fetchSpecialControlNetList( |
||||
SPUtils.getString(SPConstants.PROJECT_ID) ?: "", |
||||
"BD_KZW", |
||||
"BD_KZW_ZY", |
||||
j_query, |
||||
page |
||||
) |
||||
if (res.success) { |
||||
_controlNetListResponse.postValue(res.data) |
||||
} |
||||
} |
||||
} |
||||
|
||||
val controlNetCGListResponse: LiveData<ListResult<ControlNetCGBean>> |
||||
get() = _controlNetCGListResponse |
||||
private val _controlNetCGListResponse = MutableLiveData<ListResult<ControlNetCGBean>>() |
||||
|
||||
/** |
||||
* 获取专用控制网成果列表 |
||||
*/ |
||||
fun fetchSpecialControlNetCGList(j_query: String, page: Int = 1) { |
||||
launch { |
||||
var res = api.fetchSpecialControlNetCGList( |
||||
SPUtils.getString(SPConstants.PROJECT_ID) ?: "", |
||||
"BD_KZWZBCG", |
||||
"BD_KZWZBCG_ZY", |
||||
j_query, |
||||
page |
||||
) |
||||
if (res.success) { |
||||
_controlNetCGListResponse.postValue(res.data) |
||||
} |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 获取首级控制网列表 |
||||
*/ |
||||
fun fetchFirstControlNetList(j_query: String, page: Int = 1) { |
||||
launch { |
||||
var res = api.fetchSpecialControlNetCGList( |
||||
SPUtils.getString(SPConstants.PROJECT_ID) ?: "", |
||||
"BD_KZWZBCG", |
||||
"BD_KZWZBCG", |
||||
j_query, |
||||
page |
||||
) |
||||
if (res.success) { |
||||
_controlNetCGListResponse.postValue(res.data) |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,31 @@ |
||||
package com.project.survey.model |
||||
|
||||
/** |
||||
* { |
||||
* "KZW_TYPE_CODE": "02", |
||||
* "SY_CREATEUSERID": "c1c843dd971f416da307f5fefa9d782e", |
||||
* "KZW_TYPE_NAME": "专用", |
||||
* "KZW_APPROVALSTATUS": "", |
||||
* "KZW_VERSION": "2024-09-2704", |
||||
* "SY_GROUP_COMPANY_ID": "", |
||||
* "KZW_MEASUREMENTLEVEL": "2", |
||||
* "SY_COMPANY_ID": "V1R0gp2zJ3SvGFNvJdM", |
||||
* "KZW_FILE": "", |
||||
* "SY_CREATEUSERNAME": "zlh", |
||||
* "KZW_MEASUREMENTUNIT": "", |
||||
* "KZW_REMARK": "", |
||||
* "BD_KZW_ID": "14faecf400d74001ad37ca7b349e9de7", |
||||
* "SY_CREATETIME": "2024-09-27 15:36:26", |
||||
* "SY_ORG_ID": "systemdepartment", |
||||
* "": "2024-09-27", |
||||
* "KZW_LCMC": "专用控制网测试2", |
||||
* "KZW_MEASUREMENTUNIT_ID": "", |
||||
* "KZW_NAME": "专用", |
||||
* "BD_XMXX_ID": "" |
||||
* } |
||||
*/ |
||||
data class ControlNetBean( |
||||
val KZW_NAME:String, |
||||
val KZW_MEASUREMENTLEVEL:String, |
||||
val KZW_MEASUREMENTTIME:String |
||||
) |
@ -0,0 +1,33 @@ |
||||
package com.project.survey.model |
||||
|
||||
/** |
||||
* { |
||||
* "KZW_TYPE_CODE": "01", |
||||
* "SY_CREATEUSERID": "c1c843dd971f416da307f5fefa9d782e", |
||||
* "KZW_TYPE_NAME": "首级", |
||||
* "SY_GROUP_COMPANY_ID": "", |
||||
* "SY_COMPANY_ID": "V1R0gp2zJ3SvGFNvJdM", |
||||
* "SY_CREATEUSERNAME": "zlh", |
||||
* "BD_KZWZBCG_ID": "7a1a698ef08d4dd8b6a742fa63297764", |
||||
* "BD_KZW_ID": "", |
||||
* "SY_ORG_ID": "systemdepartment", |
||||
* "KZW_MEASUREMENTTIME": "2024-09-06 16:22:55", |
||||
* "KZWZBCG_BZ": "", |
||||
* "KZWZBCG_YCOORDINATE": "1", |
||||
* "KZWZBCG_VERSION": "", |
||||
* "KZWZBCG_HCOORDINATE": "1", |
||||
* "KZWZBCG_XCOORDINATE": "1", |
||||
* "BD_XMXX_ID": "", |
||||
* "KZW_NAME": "首级控制网1", |
||||
* "KZWZBCG_POINTNAME": "测点1" |
||||
* } |
||||
*/ |
||||
data class ControlNetCGBean( |
||||
val KZWZBCG_BZ:String, |
||||
val KZWZBCG_POINTNAME:String, |
||||
val KZWZBCG_XCOORDINATE:String, |
||||
val KZWZBCG_YCOORDINATE:String, |
||||
val KZWZBCG_HCOORDINATE:String, |
||||
val KZWZBCG_VERSION:String, |
||||
val KZW_MEASUREMENTTIME:String |
||||
) |
@ -0,0 +1,23 @@ |
||||
package com.project.survey.network |
||||
|
||||
enum class ERROR(val code: Int, val err: String) { |
||||
/** |
||||
* 未知错误 |
||||
*/ |
||||
UNKNOWN(1000, "未知错误"), |
||||
|
||||
/** |
||||
* Token过期,身份认证失效 |
||||
*/ |
||||
AUTH_ERROR(401, "身份认证失效"), |
||||
PATH_ERROR(404, "接口路径错误"), |
||||
/** |
||||
* 服务器异常 |
||||
*/ |
||||
SERVER_ERROR(500, "Server Error"), |
||||
BAD_GATEWAY(502, "Bad Gateway"), |
||||
|
||||
; |
||||
|
||||
|
||||
} |
@ -0,0 +1,27 @@ |
||||
package com.project.survey.network |
||||
|
||||
import blankj.utilcode.util.AppUtils |
||||
import retrofit2.HttpException |
||||
|
||||
object ExceptionHandle { |
||||
|
||||
fun handleException(e: Throwable): ResponseThrowable { |
||||
if (AppUtils.isAppDebug()) { |
||||
e.printStackTrace() |
||||
} |
||||
val ex: ResponseThrowable |
||||
if (e is HttpException) { |
||||
ex = when { |
||||
e.code() == ERROR.AUTH_ERROR.code -> ResponseThrowable(ERROR.AUTH_ERROR, e) |
||||
// e.code() == ERROR.PATH_ERROR.code -> ResponseThrowable(ERROR.PATH_ERROR, e) |
||||
// e.code() == ERROR.SERVER_ERROR.code -> ResponseThrowable(ERROR.SERVER_ERROR, e) |
||||
// e.code() == ERROR.BAD_GATEWAY.code -> ResponseThrowable(ERROR.BAD_GATEWAY, e) |
||||
else -> ResponseThrowable(e.code(), e.message(), e) |
||||
} |
||||
} else { |
||||
ex = if (!e.message.isNullOrEmpty()) ResponseThrowable(1000, e.message!!, e) |
||||
else ResponseThrowable(ERROR.UNKNOWN, e) |
||||
} |
||||
return ex |
||||
} |
||||
} |
@ -0,0 +1,35 @@ |
||||
package com.project.survey.network |
||||
|
||||
import java.lang.Exception |
||||
|
||||
/** |
||||
* Name: ResponseThrowable |
||||
* Author: chenglifeng |
||||
*/ |
||||
data class ResponseThrowable( |
||||
var code: Int, |
||||
var msg: String, |
||||
val e: Throwable? = null |
||||
) : Exception(e) { |
||||
|
||||
constructor(error: ERROR, e: Throwable? = null) : this(error.code, e?.message ?: error.err, e) |
||||
|
||||
|
||||
// constructor(error: ERROR, e: Throwable? = null) : super(e) { |
||||
// code = error.code |
||||
// errMsg = error.err |
||||
// data = error.err |
||||
// } |
||||
// |
||||
// constructor(code: Int, msg: String, e: Throwable? = null) : super(e) { |
||||
// this.code = code |
||||
// this.errMsg = msg |
||||
// this.data = msg |
||||
// } |
||||
// |
||||
// constructor(base: IBaseResponse<*>, e: Throwable? = null) : super(e) { |
||||
// this.code = base.code() |
||||
// this.errMsg = base.msg() |
||||
// this.data = if (base.data() == null) null else base.data() as String |
||||
// } |
||||
} |
@ -1,61 +0,0 @@ |
||||
package com.project.survey.ui.controlnet |
||||
|
||||
import android.content.Context |
||||
import android.content.Intent |
||||
import com.project.survey.adapter.ControlNetSpeciaListAdapter |
||||
import com.project.survey.databinding.ActivityControlNetListBinding |
||||
import com.project.survey.model.ControlNetListBean |
||||
import com.project.survey.model.ControlNetVersionBean |
||||
import com.project.survey.ui.base.BaseBindingActivity |
||||
import com.project.survey.widget.decoration.TransparentDividerDecoration |
||||
|
||||
/** |
||||
* 专用控制网列表 |
||||
*/ |
||||
class ControlNetSpeciaListActivity : BaseBindingActivity<ActivityControlNetListBinding>() { |
||||
private val adapter by lazy { ControlNetSpeciaListAdapter(this) } |
||||
|
||||
companion object { |
||||
fun launch(context: Context) { |
||||
context.startActivity(Intent(context, ControlNetSpeciaListActivity::class.java)) |
||||
} |
||||
} |
||||
|
||||
override fun getBinding(): ActivityControlNetListBinding { |
||||
return ActivityControlNetListBinding.inflate(layoutInflater) |
||||
} |
||||
|
||||
override fun initView() { |
||||
initVersion() |
||||
initAdapter() |
||||
} |
||||
|
||||
override fun initData() { |
||||
val dataList = mutableListOf<ControlNetListBean>() |
||||
for (i in 0 until 3) { |
||||
dataList.add(ControlNetListBean()) |
||||
} |
||||
adapter.refreshData(dataList) |
||||
} |
||||
|
||||
override fun initListener() { |
||||
|
||||
} |
||||
|
||||
private fun initVersion() { |
||||
val versionList = mutableListOf<ControlNetVersionBean>() |
||||
versionList.add(ControlNetVersionBean("版本一")) |
||||
versionList.add(ControlNetVersionBean("版本二")) |
||||
versionList.add(ControlNetVersionBean("版本三")) |
||||
|
||||
mBinding.ilSearch.spinner.setItems(versionList) |
||||
} |
||||
|
||||
private fun initAdapter() { |
||||
mBinding.recyclerView.addItemDecoration(TransparentDividerDecoration(this)) |
||||
adapter.setOnItemClickListener { |
||||
|
||||
} |
||||
mBinding.recyclerView.setAdapter(adapter) |
||||
} |
||||
} |
@ -0,0 +1,72 @@ |
||||
package com.project.survey.ui.controlnet |
||||
|
||||
import androidx.activity.viewModels |
||||
import com.project.survey.R |
||||
import com.project.survey.constants.SPConstants |
||||
import com.project.survey.databinding.ActivityControlNetListBinding |
||||
import com.project.survey.logic.viewmodel.ControlNetViewModel |
||||
import com.project.survey.model.ControlNetVersionBean |
||||
import com.project.survey.ui.base.BaseBindingActivity |
||||
import com.project.survey.ui.controlnet.adapter.ControlNetSpecialAdapter |
||||
import com.project.survey.util.ActivityNavUtil |
||||
import com.project.survey.util.SPUtils |
||||
import com.project.survey.widget.decoration.TransparentDividerDecoration |
||||
|
||||
/** |
||||
* 专用控制网列表 |
||||
*/ |
||||
class ControlNetSpecialListActivity : BaseBindingActivity<ActivityControlNetListBinding>() { |
||||
|
||||
companion object { |
||||
fun start() { |
||||
ActivityNavUtil.startActivity<ControlNetSpecialListActivity> { } |
||||
} |
||||
} |
||||
|
||||
override fun getBinding(): ActivityControlNetListBinding = |
||||
ActivityControlNetListBinding.inflate(layoutInflater) |
||||
|
||||
private val viewModel: ControlNetViewModel by viewModels() |
||||
|
||||
private val adapter by lazy { ControlNetSpecialAdapter() } |
||||
private var currentPage = 1 |
||||
|
||||
override fun initView() { |
||||
immersionToolbar(mBinding.ilToolBar.toolbar, R.string.dedicated_control_network) |
||||
|
||||
initVersion() |
||||
mBinding.recyclerView.addItemDecoration(TransparentDividerDecoration(this)) |
||||
mBinding.recyclerView.adapter = adapter |
||||
adapter.isStateViewEnable = true |
||||
adapter.setStateViewLayout(this, R.layout.layout_no_data) |
||||
} |
||||
|
||||
override fun initData() { |
||||
viewModel.controlNetListResponse.observe(this) { |
||||
adapter.submitList(it.rows) |
||||
} |
||||
//@Field("tableCode") tableCode: String = "BD_KZW", |
||||
// * @Field("funcCode") funcCode: String = "BD_KZW_ZY", |
||||
// * @Field("j_query") j_query: String = "", |
||||
// * @Field("page") page: Int, |
||||
viewModel.fetchSpecialControlNetList( |
||||
"", |
||||
currentPage |
||||
) |
||||
} |
||||
|
||||
override fun initListener() { |
||||
|
||||
} |
||||
|
||||
private fun initVersion() { |
||||
val versionList = mutableListOf<ControlNetVersionBean>() |
||||
versionList.add(ControlNetVersionBean("版本一")) |
||||
versionList.add(ControlNetVersionBean("版本二")) |
||||
versionList.add(ControlNetVersionBean("版本三")) |
||||
|
||||
mBinding.ilSearch.spinner.setItems(versionList) |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,30 @@ |
||||
package com.project.survey.ui.controlnet.adapter |
||||
|
||||
import android.content.Context |
||||
import android.view.ViewGroup |
||||
import com.chad.library.adapter4.BaseQuickAdapter |
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder |
||||
import com.project.survey.R |
||||
import com.project.survey.model.ControlNetCGBean |
||||
|
||||
class ControlNetFirstAdapter : BaseQuickAdapter<ControlNetCGBean, QuickViewHolder>() { |
||||
|
||||
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: ControlNetCGBean?) { |
||||
item?.let { bean -> |
||||
holder.setText(R.id.tvPointName, bean.KZWZBCG_POINTNAME) |
||||
.setText(R.id.tvX, bean.KZWZBCG_XCOORDINATE) |
||||
.setText(R.id.tvY, bean.KZWZBCG_YCOORDINATE) |
||||
.setText(R.id.tvZ, bean.KZWZBCG_HCOORDINATE) |
||||
.setText(R.id.tvTime, bean.KZW_MEASUREMENTTIME) |
||||
.setText(R.id.tvRemark, bean.KZWZBCG_BZ) |
||||
} |
||||
} |
||||
|
||||
override fun onCreateViewHolder( |
||||
context: Context, |
||||
parent: ViewGroup, |
||||
viewType: Int |
||||
): QuickViewHolder { |
||||
return QuickViewHolder(R.layout.item_control_net_first, parent) |
||||
} |
||||
} |
@ -0,0 +1,27 @@ |
||||
package com.project.survey.ui.controlnet.adapter |
||||
|
||||
import android.content.Context |
||||
import android.view.ViewGroup |
||||
import com.chad.library.adapter4.BaseQuickAdapter |
||||
import com.chad.library.adapter4.viewholder.QuickViewHolder |
||||
import com.project.survey.R |
||||
import com.project.survey.model.ControlNetBean |
||||
|
||||
class ControlNetSpecialAdapter : BaseQuickAdapter<ControlNetBean, QuickViewHolder>() { |
||||
|
||||
override fun onBindViewHolder(holder: QuickViewHolder, position: Int, item: ControlNetBean?) { |
||||
item?.let { bean -> |
||||
holder.setText(R.id.tvName, bean.KZW_NAME) |
||||
.setText(R.id.tvLevel, bean.KZW_MEASUREMENTLEVEL) |
||||
.setText(R.id.tvTime, bean.KZW_MEASUREMENTTIME) |
||||
} |
||||
} |
||||
|
||||
override fun onCreateViewHolder( |
||||
context: Context, |
||||
parent: ViewGroup, |
||||
viewType: Int |
||||
): QuickViewHolder { |
||||
return QuickViewHolder(R.layout.item_control_net_special, parent) |
||||
} |
||||
} |
@ -0,0 +1,159 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:background="@drawable/bg_white_round_4" |
||||
android:orientation="vertical" |
||||
android:paddingHorizontal="@dimen/sw_12dp" |
||||
android:paddingTop="@dimen/sw_12dp" |
||||
android:paddingBottom="@dimen/sw_6dp"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvPointName" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
tools:text="点名称" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_13sp" |
||||
android:textStyle="bold" /> |
||||
|
||||
<include |
||||
layout="@layout/line_hor" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_0_5dp" |
||||
android:layout_marginTop="@dimen/sw_12dp" /> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_36dp" |
||||
android:gravity="center_vertical" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
||||
android:text="X(m)" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvX" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
||||
android:gravity="end" |
||||
tools:text="362122.22" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_36dp" |
||||
android:gravity="center_vertical" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
||||
android:text="Y(m)" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvY" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
||||
android:gravity="end" |
||||
android:text="362122.22" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_36dp" |
||||
android:gravity="center_vertical" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
||||
android:text="Z(m)" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvZ" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
||||
android:gravity="end" |
||||
android:text="362122.22" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_36dp" |
||||
android:gravity="center_vertical" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
||||
android:text="施测时间" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvTime" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
||||
android:gravity="end" |
||||
android:text="2022-06-10 09:27:49" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
<LinearLayout |
||||
android:layout_width="match_parent" |
||||
android:layout_height="@dimen/sw_36dp" |
||||
android:gravity="center_vertical" |
||||
android:orientation="horizontal"> |
||||
|
||||
<TextView |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:gravity="center_vertical" |
||||
android:text="备注" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvRemark" |
||||
android:layout_width="0dp" |
||||
android:layout_height="wrap_content" |
||||
android:layout_weight="1" |
||||
android:gravity="end" |
||||
android:text="" |
||||
android:textColor="@color/text_color_1" |
||||
android:textSize="@dimen/sw_12sp" /> |
||||
|
||||
</LinearLayout> |
||||
|
||||
|
||||
</LinearLayout> |
||||
|
@ -0,0 +1,67 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" |
||||
xmlns:app="http://schemas.android.com/apk/res-auto" |
||||
xmlns:tools="http://schemas.android.com/tools" |
||||
android:layout_width="match_parent" |
||||
android:layout_height="wrap_content" |
||||
android:background="@drawable/bg_white_round_4" |
||||
android:orientation="vertical" |
||||
android:padding="12dp"> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvName" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:textColor="@color/text_color_20" |
||||
android:textSize="13sp" |
||||
android:textStyle="bold" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toTopOf="parent" |
||||
tools:text="专用" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvLevelKey" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_12dp" |
||||
android:text="等  级:" |
||||
android:textColor="@color/text_color_404145" |
||||
android:textSize="12sp" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/tvName" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvLevel" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_12dp" |
||||
android:textColor="@color/text_color_404145" |
||||
android:textSize="12sp" |
||||
app:layout_constraintStart_toEndOf="@id/tvLevelKey" |
||||
app:layout_constraintTop_toBottomOf="@id/tvName" |
||||
tools:text="内容" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvTimeKey" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_4dp" |
||||
android:text="施测时间:" |
||||
android:textColor="@color/text_color_404145" |
||||
android:textSize="12sp" |
||||
app:layout_constraintStart_toStartOf="parent" |
||||
app:layout_constraintTop_toBottomOf="@id/tvLevelKey" /> |
||||
|
||||
<TextView |
||||
android:id="@+id/tvTime" |
||||
android:layout_width="wrap_content" |
||||
android:layout_height="wrap_content" |
||||
android:layout_marginTop="@dimen/sw_4dp" |
||||
android:textColor="@color/text_color_404145" |
||||
android:textSize="12sp" |
||||
app:layout_constraintStart_toEndOf="@id/tvTimeKey" |
||||
app:layout_constraintTop_toBottomOf="@id/tvLevelKey" |
||||
tools:text="2022-05-17 10:58:48" /> |
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout> |
||||
|
Loading…
Reference in new issue