Merge branch 'dev_lvmeng'
This commit is contained in:
+14
-2
@@ -17,7 +17,9 @@ import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
||||
import com.zmkg.coaloperation.ui.tunneling.activity.TunnelingActivity
|
||||
import com.zmkg.coaloperation.ui.tunneling.activity.WorkingPointActivity
|
||||
import com.zmkg.coaloperation.utils.ScreenUtil
|
||||
import com.zmkg.coaloperation.utils.gone
|
||||
import com.zmkg.coaloperation.utils.toJsonString
|
||||
import com.zmkg.coaloperation.utils.visible
|
||||
|
||||
class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
||||
BaseQuickAdapter<TunnelWorkingFaceEntity, TunnelWorkingFaceAdapter.VH>(
|
||||
@@ -44,7 +46,9 @@ class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
||||
holder.binding.let { binding ->
|
||||
binding.includeHeader.root.isEnabled = false
|
||||
binding.tvWorkingFaceName.text = item.surfaceName
|
||||
binding.llFaceRecord.visibility = if (item.isExpandRecord) View.VISIBLE else View.GONE
|
||||
binding.llFaceRecord.let {
|
||||
if (item.isExpandRecord) it.visible() else it.gone()
|
||||
}
|
||||
binding.ivExpandRecord.setImageResource(
|
||||
if (item.isExpandRecord) R.drawable.ic_arrow_down_white else R.drawable.ic_arrow_right_gray
|
||||
)
|
||||
@@ -55,6 +59,10 @@ class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
||||
item.records = mutableListOf()
|
||||
}
|
||||
val size = item.records!!.size
|
||||
binding.includeHeader.root.let { header ->
|
||||
if (size > 0) header.visible()
|
||||
else header.gone()
|
||||
}
|
||||
rv.updateLayoutParams {
|
||||
height = if (size >= 3)
|
||||
ScreenUtil.dp2px(150F)
|
||||
@@ -91,7 +99,11 @@ class TunnelWorkingFaceAdapter(var list: MutableList<TunnelWorkingFaceEntity>) :
|
||||
inner class VH(var binding: ListItemTunnelWorkingFaceBinding) : BaseViewHolder(binding.root)
|
||||
|
||||
init {
|
||||
addChildClickViewIds(R.id.start_record, R.id.ivExpandRecord)
|
||||
addChildClickViewIds(
|
||||
R.id.start_record,
|
||||
R.id.ivExpandRecord,
|
||||
R.id.llWorkingFace
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
+3
@@ -30,6 +30,9 @@ interface TunnelWorkingFaceRecordDao {
|
||||
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :recordId")
|
||||
fun getEntityById(recordId: Long): TunnelWorkingFaceRecordEntity
|
||||
|
||||
@Query("SELECT * FROM tunnel_working_face_record WHERE surfaceId = :surfaceId AND latestRecordState = '1' ORDER BY createTime ASC LIMIT 1")
|
||||
fun getLastEntity(surfaceId: Long): TunnelWorkingFaceRecordEntity?
|
||||
|
||||
@Query("DELETE FROM tunnel_working_face_record")
|
||||
fun deleteAll(): Int
|
||||
}
|
||||
+5
-1
@@ -2,6 +2,7 @@ package com.zmkg.coaloperation.db.entiry.tunnel
|
||||
|
||||
import android.os.Parcelable
|
||||
import androidx.room.Entity
|
||||
import androidx.room.Ignore
|
||||
import androidx.room.PrimaryKey
|
||||
import com.zmkg.coaloperation.utils.DateTimeUtil
|
||||
import kotlinx.parcelize.Parcelize
|
||||
@@ -59,4 +60,7 @@ class TunnelRoofLithologyEntity (
|
||||
* 数据状态:0-默认值,原始数据,1-已修改数据
|
||||
*/
|
||||
var dataState: String = "0"
|
||||
): Parcelable
|
||||
): Parcelable {
|
||||
@Ignore
|
||||
constructor():this(lithologyId = 0)
|
||||
}
|
||||
|
||||
+9
@@ -68,6 +68,10 @@ data class TunnelWorkingFaceRecordEntity (
|
||||
* 煤层高度
|
||||
*/
|
||||
var seamHeight: String? = null,
|
||||
/**
|
||||
* 涌水量
|
||||
*/
|
||||
var waterYield: String? = null,
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
@@ -84,6 +88,11 @@ data class TunnelWorkingFaceRecordEntity (
|
||||
*/
|
||||
var dataState: String = "0",
|
||||
|
||||
/**
|
||||
* 工作面中昨日记录状态:0-默认值,非昨日记录,1-昨日记录
|
||||
*/
|
||||
var latestRecordState: String = "0",
|
||||
|
||||
@Ignore
|
||||
var mineWorkingLithologyList: MutableList<TunnelRoofLithologyEntity>? = null,
|
||||
|
||||
|
||||
+5
@@ -31,6 +31,11 @@ class TunnelWorkingFaceRecordRepository(private val dao: TunnelWorkingFaceRecord
|
||||
suspend fun getEntityById(faceId: Long) = withContext(Dispatchers.IO) {
|
||||
dao.getEntityById(faceId)
|
||||
}
|
||||
|
||||
suspend fun getLastEntity(surfaceId: Long) = withContext(Dispatchers.IO) {
|
||||
dao.getLastEntity(surfaceId)
|
||||
}
|
||||
|
||||
suspend fun deleteAll() = withContext(Dispatchers.IO) {
|
||||
dao.deleteAll()
|
||||
}
|
||||
|
||||
+5
@@ -56,6 +56,11 @@ class TunnelWorkingFaceRecordViewModel(application: Application) : AndroidViewMo
|
||||
repository.getEntityById(recordId)
|
||||
}
|
||||
|
||||
fun getLastEntity(surfaceId: Long, action: (TunnelWorkingFaceRecordEntity?) -> Unit) = viewModelScope.launch {
|
||||
val record = repository.getLastEntity(surfaceId)
|
||||
action(record)
|
||||
}
|
||||
|
||||
fun deleteAll(action: () -> Unit={}) = viewModelScope.launch {
|
||||
repository.deleteAll()
|
||||
action()
|
||||
|
||||
+1
@@ -230,6 +230,7 @@ class AddWorkingPointActivity :
|
||||
Log.d(TAG, "saveFaceRecord: ${roofLithologyList.toJson()}")
|
||||
|
||||
workingFaceRecordViewModel.insert(faceRecord) {
|
||||
EventBus.getDefault().post(faceRecord)
|
||||
roofLithologyViewModel.insertList(roofLithologyList) {
|
||||
finish()
|
||||
}
|
||||
|
||||
+37
-10
@@ -41,12 +41,13 @@ class TunnelingActivity :
|
||||
|
||||
private val workingFaceAdapter: TunnelWorkingFaceAdapter by lazy {
|
||||
TunnelWorkingFaceAdapter(workingFaceList).apply {
|
||||
setOnItemClickListener { _, _, position ->
|
||||
toActivity(WorkingFaceDetailActivity::class.java, Bundle().apply {
|
||||
putParcelable(WorkingFaceDetailActivity.FACE_DETAIL, workingFaceList[position])
|
||||
})
|
||||
}
|
||||
setOnItemChildClickListener { _, view, position ->
|
||||
if (view.id == R.id.llWorkingFace) {
|
||||
toActivity(WorkingFaceDetailActivity::class.java, Bundle().apply {
|
||||
putParcelable(WorkingFaceDetailActivity.FACE_DETAIL, workingFaceList[position])
|
||||
})
|
||||
return@setOnItemChildClickListener
|
||||
}
|
||||
if (view.id == R.id.ivExpandRecord) {
|
||||
val expandState = view.tag.toString().toBooleanStrictOrNull() ?: false
|
||||
workingFaceList[position].isExpandRecord = expandState.not()
|
||||
@@ -126,10 +127,7 @@ class TunnelingActivity :
|
||||
workingFaceAdapter.notifyItemChanged(position)
|
||||
return@getEntityList
|
||||
}
|
||||
val viewHolder =
|
||||
mBinding.rvList.findViewHolderForLayoutPosition(position) as TunnelWorkingFaceAdapter.VH
|
||||
val recordAdapter =
|
||||
viewHolder.binding.rvFaceRecord.adapter as TunnelWorkingFaceRecordAdapter
|
||||
val recordAdapter = getRecordAdapter(position)
|
||||
recordAdapter.apply {
|
||||
list.clear()
|
||||
// list.add(FACE_RECORD_HEADER)
|
||||
@@ -143,6 +141,15 @@ class TunnelingActivity :
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onWorkingFaceEvent(event: TunnelWorkingFaceEntity) {
|
||||
val index = workingFaceList.indexOfFirst { it.surfaceId == event.surfaceId }
|
||||
if (index == -1) {
|
||||
//新增工作面
|
||||
val insertIndex = workingFaceList.size
|
||||
workingFaceList.add(event)
|
||||
workingFaceAdapter.notifyItemInserted(insertIndex)
|
||||
workingFaceAdapter.notifyItemRangeChanged(insertIndex, insertIndex+1)
|
||||
return
|
||||
}
|
||||
//修改工作面
|
||||
workingFaceViewModel.getEntityById(event.surfaceId) { entity ->
|
||||
workingFaceList[index] = entity
|
||||
workingFaceAdapter.notifyItemChanged(index)
|
||||
@@ -151,7 +158,27 @@ class TunnelingActivity :
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onFaceRecordEvent(event: TunnelWorkingFaceRecordEntity) {
|
||||
//TODO 折叠子列表
|
||||
val position = workingFaceList.indexOfFirst { it.surfaceId == event.surfaceId }
|
||||
val faceEntity = workingFaceList[position]
|
||||
if (faceEntity.isExpandRecord.not()) {
|
||||
return
|
||||
}
|
||||
faceEntity.records?.let { records ->
|
||||
val index = records.indexOfFirst { it.recordId == event.recordId }
|
||||
if (index == -1) {
|
||||
records.add(event)
|
||||
} else {
|
||||
records[index] = event
|
||||
}
|
||||
}
|
||||
val recordAdapter = getRecordAdapter(position)
|
||||
recordAdapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
private fun getRecordAdapter(position:Int):TunnelWorkingFaceRecordAdapter {
|
||||
val viewHolder =
|
||||
mBinding.rvList.findViewHolderForLayoutPosition(position) as TunnelWorkingFaceAdapter.VH
|
||||
return viewHolder.binding.rvFaceRecord.adapter as TunnelWorkingFaceRecordAdapter
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -287,6 +287,7 @@ class WorkFaceActivity :
|
||||
}
|
||||
workingFaceViewModel.insert(workingFaceEntity) {
|
||||
showToast("工作面新增完成")
|
||||
EventBus.getDefault().post(workingFaceEntity)
|
||||
finish()
|
||||
}
|
||||
}
|
||||
|
||||
+34
-4
@@ -5,8 +5,12 @@ import android.view.View
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.zmkg.coaloperation.databinding.ActivityWorkingFaceDetailBinding
|
||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelWorkingFaceEntity
|
||||
import com.zmkg.coaloperation.db.viewmodel.TunnelRoofLithologyViewModel
|
||||
import com.zmkg.coaloperation.db.viewmodel.TunnelWorkingFaceRecordViewModel
|
||||
import com.zmkg.coaloperation.ui.tunneling.adapter.TunnelingRockNatureAdapter
|
||||
import com.zmkg.coaloperation.ui.tunneling.bean.FaceWorkDetailBean
|
||||
import com.zmkg.coaloperation.ui.tunneling.viewmodel.TunnelingViewModel
|
||||
@@ -26,7 +30,18 @@ class WorkingFaceDetailActivity :
|
||||
const val FACE_DETAIL = "faceDetail"
|
||||
}
|
||||
|
||||
val tunnelingRockNatureAdapter: TunnelingRockNatureAdapter by lazy { TunnelingRockNatureAdapter() }
|
||||
private val workingFaceRecordViewModel: TunnelWorkingFaceRecordViewModel by lazy {
|
||||
ViewModelProvider(this)[TunnelWorkingFaceRecordViewModel::class.java]
|
||||
}
|
||||
|
||||
private val roofLithologyViewModel: TunnelRoofLithologyViewModel by lazy {
|
||||
ViewModelProvider(this)[TunnelRoofLithologyViewModel::class.java]
|
||||
}
|
||||
private val tunnelingRockNatureAdapter: TunnelingRockNatureAdapter by lazy {
|
||||
TunnelingRockNatureAdapter(lithologyList)
|
||||
}
|
||||
|
||||
private val lithologyList:MutableList<TunnelRoofLithologyEntity> = mutableListOf()
|
||||
|
||||
private var faceDetail: TunnelWorkingFaceEntity? = null
|
||||
|
||||
@@ -70,8 +85,23 @@ class WorkingFaceDetailActivity :
|
||||
// }
|
||||
faceDetail = intent.getParcelableExtra(FACE_DETAIL)
|
||||
|
||||
faceDetail?.let {
|
||||
faceDetail?.let { detail ->
|
||||
loadFaceDetail()
|
||||
workingFaceRecordViewModel.getLastEntity(detail.surfaceId) { record ->
|
||||
record?.let {
|
||||
mBinding.tvYesterdayLen.text = "${it.workingFootage}m"
|
||||
mBinding.tvWorkingFaceAngle.text = "${it.seamDip}"
|
||||
// mBinding.tvMonthAccumulateLen.text = "${it.monthFootage}m"
|
||||
mBinding.tvWorkingFaceWater.text = "${it.waterYield}"
|
||||
|
||||
roofLithologyViewModel.getEntityList(it.recordId) { list ->
|
||||
list?.let {
|
||||
lithologyList.addAll(it)
|
||||
tunnelingRockNatureAdapter.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +137,7 @@ class WorkingFaceDetailActivity :
|
||||
bean ?: return
|
||||
}
|
||||
|
||||
private fun stringToDouble(numText:String?): Double {
|
||||
private fun stringToDouble(numText: String?): Double {
|
||||
if (numText.isNullOrEmpty() || numText.isBlank()) return 0.toDouble()
|
||||
return numText.toDouble()
|
||||
}
|
||||
@@ -119,7 +149,7 @@ class WorkingFaceDetailActivity :
|
||||
|
||||
val total = stringToDouble(bean.totalFootage)
|
||||
val accumulative = stringToDouble(bean.accumulativeFootage)
|
||||
val remaining =stringToDouble( bean.remainingFootage)
|
||||
val remaining = stringToDouble(bean.remainingFootage)
|
||||
|
||||
tvLenTotal.text = "总进尺:${total}m"
|
||||
tvLenAccumulate.text = "累计进尺:${accumulative}m"
|
||||
|
||||
+21
-9
@@ -1,26 +1,38 @@
|
||||
package com.zmkg.coaloperation.ui.tunneling.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.ui.tunneling.bean.MineWorkingLithology
|
||||
import com.zmkg.coaloperation.ui.tunneling.bean.TunnelingHomeItemBean
|
||||
import com.zmkg.coaloperation.databinding.ItemRockNatureBinding
|
||||
import com.zmkg.coaloperation.db.entiry.tunnel.TunnelRoofLithologyEntity
|
||||
|
||||
|
||||
/**
|
||||
* 顶板岩性
|
||||
*/
|
||||
|
||||
class TunnelingRockNatureAdapter :
|
||||
BaseQuickAdapter<MineWorkingLithology, BaseViewHolder>(R.layout.item_rock_nature) {
|
||||
class TunnelingRockNatureAdapter(list: MutableList<TunnelRoofLithologyEntity>) :
|
||||
BaseQuickAdapter<TunnelRoofLithologyEntity, TunnelingRockNatureAdapter.VH>(R.layout.item_rock_nature, list) {
|
||||
|
||||
inner class VH(var binding: ItemRockNatureBinding):BaseViewHolder(binding.root)
|
||||
|
||||
override fun convert(holder: BaseViewHolder, item: MineWorkingLithology) {
|
||||
holder.setText(R.id.tvRock1Start, "${item.positionStart}")
|
||||
.setText(R.id.tvRock1End, "${item.positionEnd}")
|
||||
.setText(R.id.tvRock1Name, item.lithologyType)
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||
val binding = ItemRockNatureBinding.inflate(
|
||||
LayoutInflater.from(context),parent, false
|
||||
)
|
||||
return VH(binding).also {
|
||||
bindViewClickListener(it, viewType)
|
||||
}
|
||||
}
|
||||
|
||||
override fun convert(holder: VH, item: TunnelRoofLithologyEntity) {
|
||||
holder.binding.let {
|
||||
it.tvRock1Start.text = item.positionStart
|
||||
it.tvRock1End.text = item.positionEnd
|
||||
it.tvRock1Name.text = item.lithologyType
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+4
@@ -155,6 +155,10 @@ class UserFragment :
|
||||
workingFaceViewModel.insertList(list) {}
|
||||
list.forEach { faceEntity ->
|
||||
faceEntity.records?.let { recordList ->
|
||||
val lastRecordId = faceEntity.latestRecord?.recordId
|
||||
val record = recordList.firstOrNull {it.recordId == lastRecordId}
|
||||
record?.latestRecordState = "1"
|
||||
|
||||
//保存工作面记录数据
|
||||
workingFaceRecordViewModel.insertList(recordList)
|
||||
recordList.forEach { recordEntity ->
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
android:id="@+id/toolbar_lay"
|
||||
layout="@layout/lay_title_right_bar" />
|
||||
|
||||
<ScrollView
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="20dp"
|
||||
@@ -32,8 +32,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:background="@drawable/bg_stroke_gray"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_stroke_gray">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@@ -266,7 +266,7 @@
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- tools:minHeight="60dp" />-->
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.zmkg.coaloperation.view.NestedRecyclerView
|
||||
android:id="@+id/rvLithology"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -428,14 +428,14 @@
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
style="?android:attr/buttonBarStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:paddingTop="20dp"
|
||||
android:paddingBottom="20dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="30dp"
|
||||
android:paddingEnd="30dp">
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1Start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/dash_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1End"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="m"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1Name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="岩"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1Start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/dash_line" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1End"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="m"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvRock1Name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@drawable/bg_solid_black"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:minWidth="60dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="岩"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</layout>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.allen.library.shape.ShapeLinearLayout
|
||||
android:id="@+id/llWorkingFace"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
|
||||
@@ -32,7 +32,7 @@ ext {
|
||||
"core-testing" : "androidx.arch.core:core-testing:$archCore",
|
||||
"core-runtime" : "androidx.arch.core:core-runtime:$archCore",
|
||||
"coreKtx" : "androidx.core:core-ktx:1.8.0",
|
||||
"kotlin-reflect" : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
|
||||
// "kotlin-reflect" : "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion",
|
||||
//协程
|
||||
"coroutines-core" : "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion",
|
||||
"coroutines-android" : "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion",
|
||||
|
||||
Reference in New Issue
Block a user