涌水量
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
<activity android:name=".ui.mining.activity.MiningFaceRecordActivity"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name=".ui.user.activity.DataSyncActivity" />
|
||||
<activity android:name=".ui.wateryield.WaterYieldObserveActivity" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
package com.zmkg.coaloperation.adapter
|
||||
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.databinding.ListItemWaterYieldObserveBinding
|
||||
import com.zmkg.coaloperation.db.entity.water.WaterYieldObserveEntity
|
||||
import com.zmkg.coaloperation.utils.useShapeSetBackground
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.zmkg.coaloperation.utils.dp
|
||||
|
||||
class WaterYieldObserveAdapter(list: MutableList<WaterYieldObserveEntity>):
|
||||
BaseQuickAdapter<WaterYieldObserveEntity, WaterYieldObserveAdapter.VH>(R.layout.list_item_water_yield_observe, list) {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): VH {
|
||||
val binding = ListItemWaterYieldObserveBinding.inflate(
|
||||
LayoutInflater.from(context), parent, false
|
||||
)
|
||||
return VH(binding).also {
|
||||
bindViewClickListener(it, viewType)
|
||||
}
|
||||
}
|
||||
|
||||
override fun convert(
|
||||
holder: VH,
|
||||
item: WaterYieldObserveEntity
|
||||
) {
|
||||
holder.binding.let {
|
||||
it.tvObservePoint.text = item.observePoint
|
||||
it.tvObserveTime.text = item.observeTime
|
||||
it.tvObserveState.run {
|
||||
var stateColor = ""
|
||||
if (item.observeState == "1") {
|
||||
text = "已观测"
|
||||
stateColor = "#3ECD88"
|
||||
} else {
|
||||
text = "未观测"
|
||||
stateColor = "#803398"
|
||||
}
|
||||
useShapeSetBackground(
|
||||
shape = GradientDrawable.RECTANGLE,
|
||||
cornerRadius = 20F.dp,
|
||||
solidColor = stateColor.toColorInt(),
|
||||
)
|
||||
}
|
||||
it.root.updateLayoutParams<RecyclerView.LayoutParams> {
|
||||
bottomMargin = if (holder.layoutPosition == data.size - 1) 80.dp else 3.dp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inner class VH(var binding: ListItemWaterYieldObserveBinding): BaseViewHolder(binding.root)
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.zmkg.coaloperation.db.entity.water
|
||||
|
||||
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
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Parcelize
|
||||
@Entity(tableName = "water_yield_observe")
|
||||
data class WaterYieldObserveEntity(
|
||||
@PrimaryKey
|
||||
var observeId: Long = 0,
|
||||
var observePoint: String = "",
|
||||
var observeTime: String = "",
|
||||
var observeState:String = "0",
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
var createTime: String? = "",
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
var updateTime: String? = DateTimeUtil.formatDateTime(LocalDateTime.now()),
|
||||
|
||||
/**
|
||||
* 数据状态:0-默认值,原始数据,1-已修改数据
|
||||
*/
|
||||
var dataState: String = "0"
|
||||
|
||||
) : Parcelable {
|
||||
@Ignore
|
||||
constructor() : this(observeId = 0)
|
||||
}
|
||||
+4
@@ -1,5 +1,6 @@
|
||||
package com.zmkg.coaloperation.ui.home.adapter
|
||||
|
||||
import android.widget.Toast
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.zmkg.coaloperation.R
|
||||
@@ -30,5 +31,8 @@ class HomeMenuAdapter :
|
||||
R.id.img,
|
||||
getMenuTabImg(item.index!!, holder.itemViewType)
|
||||
)
|
||||
holder.itemView.setOnClickListener {
|
||||
item.onClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,13 @@ package com.zmkg.coaloperation.ui.home.bean
|
||||
import com.chad.library.adapter.base.entity.MultiItemEntity
|
||||
|
||||
|
||||
class HomeMenuBean : MultiItemEntity {
|
||||
var name: String? = null
|
||||
var index: Int? = null
|
||||
var type: Int? = null // 0: 前4个(左右布局),1: 后4个(上下布局)
|
||||
|
||||
data class HomeMenuBean(
|
||||
var name: String? = null,
|
||||
var index: Int? = null,
|
||||
var type: Int? = null, // 0: 前4个(左右布局),1: 后4个(上下布局)
|
||||
var onClick:()->Unit = {}
|
||||
) : MultiItemEntity {
|
||||
override val itemType: Int
|
||||
get() = type!!
|
||||
|
||||
|
||||
}
|
||||
|
||||
+23
-43
@@ -1,40 +1,32 @@
|
||||
package com.zmkg.coaloperation.ui.home.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import androidx.lifecycle.repeatOnLifecycle
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.listener.OnItemClickListener
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.adapter.common.ViewPagerAdapter
|
||||
import com.zmkg.coaloperation.base.BaseVMBFragment
|
||||
import com.zmkg.coaloperation.databinding.FragmentHomeBinding
|
||||
import com.zmkg.coaloperation.local.DataStoreManager
|
||||
import com.zmkg.coaloperation.superfuntion.addItemTouchCallback
|
||||
import com.zmkg.coaloperation.superfuntion.init
|
||||
import com.zmkg.coaloperation.superfuntion.onPageChangeCallback
|
||||
import com.zmkg.coaloperation.superfuntion.toJson
|
||||
import com.zmkg.coaloperation.ui.home.adapter.HomeMenuAdapter
|
||||
import com.zmkg.coaloperation.ui.home.bean.HomeMenuBean
|
||||
import com.zmkg.coaloperation.ui.home.viewmodel.HomeViewModel
|
||||
import com.zmkg.coaloperation.ui.wateryield.WaterYieldObserveActivity
|
||||
import com.zmkg.coaloperation.utils.DictUtils
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
|
||||
class HomeFragment :
|
||||
BaseVMBFragment<HomeViewModel, FragmentHomeBinding>(R.layout.fragment_home),
|
||||
OnItemClickListener {
|
||||
|
||||
private val homeMenuAdapter: HomeMenuAdapter by lazy { HomeMenuAdapter() }
|
||||
private val homeMenuAdapter: HomeMenuAdapter by lazy {
|
||||
HomeMenuAdapter()
|
||||
}
|
||||
|
||||
override fun initView(root: View?, savedInstanceState: Bundle?) {
|
||||
mBinding.apply {
|
||||
@@ -48,7 +40,7 @@ class HomeFragment :
|
||||
rvList.adapter = homeMenuAdapter
|
||||
rvList.addItemTouchCallback {
|
||||
resetItemTypes(homeMenuAdapter.data)
|
||||
DataStoreManager.setHomeData(homeMenuAdapter.data.toJson())
|
||||
// DataStoreManager.setHomeData(homeMenuAdapter.data.toJson())
|
||||
homeMenuAdapter.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@@ -84,39 +76,27 @@ class HomeFragment :
|
||||
DictUtils.initData()
|
||||
// mViewModel.getWaterLedgerData()
|
||||
|
||||
val titleNameList = mutableListOf(
|
||||
"涌水量观测",
|
||||
"导线测量",
|
||||
"瓦斯巡检",
|
||||
"防灭火检查",
|
||||
"通风巡检",
|
||||
"地质编录",
|
||||
"水文地质编录",
|
||||
"隐蔽致灾",
|
||||
"地物查询"
|
||||
val menuList = mutableListOf(
|
||||
HomeMenuBean(index = 1, name = "涌水量观测", type = 0, onClick = {
|
||||
toActivity(WaterYieldObserveActivity::class.java)
|
||||
}),
|
||||
HomeMenuBean(index = 2, name = "导线测量", type = 0),
|
||||
HomeMenuBean(index = 3, name = "瓦斯巡检", type = 0),
|
||||
HomeMenuBean(index = 4, name = "防灭火检查", type = 0),
|
||||
HomeMenuBean(index = 5, name = "通风巡检", type = 1),
|
||||
HomeMenuBean(index = 6, name = "地质编录", type = 1),
|
||||
HomeMenuBean(index = 7, name = "水文地质编录", type = 1),
|
||||
HomeMenuBean(index = 8, name = "隐蔽致灾", type = 1),
|
||||
HomeMenuBean(index = 9, name = "地物查询", type = 1)
|
||||
)
|
||||
var mutableListOf = mutableListOf<HomeMenuBean>()
|
||||
|
||||
val homeData = DataStoreManager.getHomeData()
|
||||
if (TextUtils.isEmpty(homeData)) {
|
||||
// val homeData = DataStoreManager.getHomeData()
|
||||
// if (!TextUtils.isEmpty(homeData)) {
|
||||
// val listType = object : TypeToken<MutableList<HomeMenuBean>?>() {}.type
|
||||
// mutableListOf = Gson().fromJson(homeData, listType)
|
||||
// }
|
||||
|
||||
titleNameList.forEachIndexed { index, s ->
|
||||
val homeMenuBean = HomeMenuBean()
|
||||
homeMenuBean.name = s
|
||||
homeMenuBean.index = index + 1
|
||||
if (index < 4) {
|
||||
homeMenuBean.type = 0
|
||||
} else {
|
||||
homeMenuBean.type = 1
|
||||
}
|
||||
mutableListOf.add(homeMenuBean)
|
||||
}
|
||||
} else {
|
||||
val listType = object : TypeToken<MutableList<HomeMenuBean>?>() {}.getType()
|
||||
mutableListOf = Gson().fromJson(homeData, listType)
|
||||
}
|
||||
|
||||
homeMenuAdapter.setNewInstance(mutableListOf)
|
||||
homeMenuAdapter.setNewInstance(menuList)
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-9
@@ -171,15 +171,7 @@ class MiningActivity :
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
private fun getFaceRecord(position: Int) {
|
||||
workingFaceList[position].records?.let {
|
||||
if (it.isNotEmpty()) {
|
||||
val recordAdapter = getRecordAdapter(position)
|
||||
recordAdapter.apply {
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
workingFaceAdapter.notifyItemChanged(position)
|
||||
}
|
||||
}
|
||||
workingFaceAdapter.notifyItemChanged(position)
|
||||
// val surfaceId = workingFaceList[position].surfaceId
|
||||
// workingFaceRecordViewModel.getEntityList(surfaceId) { recordEntities ->
|
||||
// if (recordEntities.isNullOrEmpty()) {
|
||||
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
package com.zmkg.coaloperation.ui.wateryield
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.adapter.WaterYieldObserveAdapter
|
||||
import com.zmkg.coaloperation.base.BaseVMBActivity
|
||||
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||
import com.zmkg.coaloperation.bean.WorkOption
|
||||
import com.zmkg.coaloperation.databinding.ActivityWaterYieldObserveBinding
|
||||
import com.zmkg.coaloperation.db.entity.water.WaterYieldObserveEntity
|
||||
import com.zmkg.coaloperation.utils.PickerUtil
|
||||
|
||||
/**
|
||||
* 关于我们
|
||||
*/
|
||||
class WaterYieldObserveActivity :
|
||||
BaseVMBActivity<TestViewModel, ActivityWaterYieldObserveBinding>(R.layout.activity_water_yield_observe) {
|
||||
|
||||
val observeList: MutableList<WaterYieldObserveEntity> = mutableListOf()
|
||||
val observeAdapter by lazy {
|
||||
WaterYieldObserveAdapter(observeList).apply {
|
||||
setOnItemClickListener { adapter, view, position ->
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun initView(savedInstanceState: Bundle?) {
|
||||
mBinding.toolbarLay.title = "涌水量观测"
|
||||
mBinding.toolbarLay.rightText = "添加观测点"
|
||||
mBinding.toolbarLay.titleTvRight.setOnClickListener {
|
||||
|
||||
}
|
||||
initTestObserveData()
|
||||
mBinding.rvWaterYield.let {
|
||||
it.layoutManager = LinearLayoutManager(this)
|
||||
it.adapter = observeAdapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun initTestObserveData() {
|
||||
observeList.run {
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点A", observeTime = "2024-09-01 15:15:00", observeState = "0"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点B", observeTime = "2024-10-09 10:36:00", observeState = "0"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点C", observeTime = "2024-11-13 16:56:00", observeState = "0"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点D", observeTime = "2024-12-19 12:13:00", observeState = "0"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点E", observeTime = "2025-01-09 08:36:00", observeState = "1"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点F", observeTime = "2025-02-20 18:20:00", observeState = "1"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点G", observeTime = "2025-03-09 11:25:00", observeState = "1"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点H", observeTime = "2025-04-30 13:30:00", observeState = "1"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点I", observeTime = "2025-05-06 07:55:00", observeState = "1"
|
||||
))
|
||||
add(WaterYieldObserveEntity(
|
||||
observeId = 1, observePoint = "观测点J", observeTime = "2025-06-08 14:13:00", observeState = "1"
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
override fun initData() {
|
||||
}
|
||||
|
||||
override fun bindEvent() {
|
||||
val list = mutableListOf<WorkOption>()
|
||||
list.add(WorkOption("1", "观测点A"))
|
||||
list.add(WorkOption("2", "观测点B"))
|
||||
list.add(WorkOption("3", "观测点C"))
|
||||
list.add(WorkOption("4", "观测点D"))
|
||||
list.add(WorkOption("5", "观测点E"))
|
||||
list.add(WorkOption("6", "观测点F"))
|
||||
list.add(WorkOption("7", "观测点G"))
|
||||
list.add(WorkOption("8", "观测点H"))
|
||||
mBinding.llSelectObservePoint.setOnClickListener {
|
||||
PickerUtil.showOptionPicker(this, "请选择观测点", list) { option ->
|
||||
mBinding.tvObservePoint.let {
|
||||
it.text = option.name
|
||||
it.tag = option.id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun processClick(v: View?) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,10 @@ package com.zmkg.coaloperation.utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.SharedPreferences
|
||||
import android.content.res.Resources
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.GradientDrawable
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@@ -87,5 +91,39 @@ fun String.formatDecimalString(): String {
|
||||
fun Double.roundedOneDecimalPlace(): Double {
|
||||
return BigDecimal(this).setScale(1, RoundingMode.HALF_UP).toDouble()
|
||||
}
|
||||
val Float.sp: Float
|
||||
get() = TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_SP,
|
||||
this,
|
||||
Resources.getSystem().displayMetrics
|
||||
)
|
||||
|
||||
val Int.sp: Int
|
||||
get() = this.toFloat().sp.toInt()
|
||||
val Float.dp: Float
|
||||
get() = TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP,
|
||||
this,
|
||||
Resources.getSystem().displayMetrics
|
||||
)
|
||||
|
||||
val Int.dp: Int
|
||||
get() = this.toFloat().dp.toInt()
|
||||
|
||||
fun View.useShapeSetBackground(
|
||||
shape: Int = GradientDrawable.RECTANGLE,
|
||||
cornerRadius: Float = 0F,
|
||||
solidColor: Int = Color.TRANSPARENT,
|
||||
strokeWidth: Int = 0,
|
||||
strokeColor: Int = Color.TRANSPARENT,
|
||||
) {
|
||||
val shape = GradientDrawable().also {
|
||||
it.shape = shape
|
||||
it.cornerRadius = cornerRadius
|
||||
it.setColor(solidColor)
|
||||
it.setStroke(strokeWidth, strokeColor)
|
||||
}
|
||||
this.background = shape
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/black_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/toolbar_lay"
|
||||
layout="@layout/lay_title_right_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="20dp">
|
||||
|
||||
<com.allen.library.shape.ShapeLinearLayout
|
||||
android:id="@+id/llSelectObservePoint"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="match_parent"
|
||||
app:shapeCornersRadius="10dp"
|
||||
android:gravity="center"
|
||||
app:shapeSolidColor="#17181C">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvObservePoint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:hint="请选择观测点"
|
||||
app:drawableEndCompat="@drawable/ic_arrow_down_gray"
|
||||
app:shapeCornersRadius="10dp"
|
||||
android:gravity="center"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:drawablePadding="10dp"
|
||||
app:shapeSolidColor="#17181C"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/hint_text_color2" />
|
||||
|
||||
</com.allen.library.shape.ShapeLinearLayout>
|
||||
|
||||
<com.allen.library.shape.ShapeLinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1.24"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
app:shapeCornersRadius="10dp"
|
||||
android:gravity="center"
|
||||
app:shapeSolidColor="#17181C" >
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etInputText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:hint="请输入搜索内容"
|
||||
app:drawableStartCompat="@drawable/ic_search_gray"
|
||||
app:shapeCornersRadius="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:drawablePadding="10dp"
|
||||
app:shapeSolidColor="#17181C"
|
||||
android:textSize="14sp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:textColor="@color/white"
|
||||
android:textCursorDrawable="@drawable/cursor_white"
|
||||
android:background="@color/transparent"
|
||||
android:textColorHint="@color/hint_text_color2" />
|
||||
|
||||
</com.allen.library.shape.ShapeLinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvWaterYield"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
tools:listitem="@layout/list_item_water_yield_observe"
|
||||
android:overScrollMode="never" />
|
||||
|
||||
<com.allen.library.shape.ShapeButton
|
||||
android:id="@+id/btnStopObserve"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="bottom|center_horizontal"
|
||||
android:gravity="center"
|
||||
android:textSize="18sp"
|
||||
android:text="结束观测"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:textColor="@color/white"
|
||||
app:shapeCornersRadius="36dp"
|
||||
app:shapeSolidColor="#21A69A" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -14,6 +14,7 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
android:background="@color/black_bg">
|
||||
|
||||
|
||||
@@ -52,7 +53,7 @@
|
||||
android:textSize="14sp" />
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
<com.zmkg.coaloperation.view.NestedRecyclerView
|
||||
android:id="@+id/rv_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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"
|
||||
tools:ignore="ContentDescription">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
|
||||
<com.allen.library.shape.ShapeLinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginBottom="3dp"
|
||||
app:shapeCornersRadius="10dp"
|
||||
app:shapeSolidColor="#17181C"
|
||||
app:shapeStrokeColor="#282C38"
|
||||
app:shapeStrokeWidth="1dp">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivFlagEdit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/ic_flag_edit"
|
||||
android:visibility="gone" />
|
||||
</FrameLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="38dp"
|
||||
android:background="@drawable/ic_geological" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvObservePoint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
tools:text="观测点16" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvObserveTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
tools:text="2024-09-03 15:00:00" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:id="@+id/tvObserveState"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="23dp"
|
||||
android:layout_marginEnd="11dp"
|
||||
android:gravity="center"
|
||||
tools:text="已观测"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp" />
|
||||
<!-- app:shapeCornersRadius="20dp"-->
|
||||
<!-- app:shapeSolidColor="#3ECD88"-->
|
||||
|
||||
</com.allen.library.shape.ShapeLinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -26,6 +26,7 @@
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="black">#000000</color>
|
||||
<color name="hint_text_color">#5B6783</color>
|
||||
<color name="hint_text_color2">#6A6F87</color>
|
||||
|
||||
<color name="black_bg">#0C0D0E</color>
|
||||
<color name="black_bg2">#17181C</color>
|
||||
|
||||
Reference in New Issue
Block a user