编录点新增2
This commit is contained in:
+10
-4
@@ -3,15 +3,15 @@ package com.zmkg.coaloperation.adapter
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
|
||||
import com.chad.library.adapter.base.viewholder.BaseViewHolder
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.bean.BaseItem
|
||||
import com.zmkg.coaloperation.bean.GeoPointMultiItem
|
||||
import com.zmkg.coaloperation.databinding.ListItemPointBaseHorizontalBinding
|
||||
import com.zmkg.coaloperation.databinding.ListItemPointLoggingItemBinding
|
||||
import com.zmkg.coaloperation.utils.gone
|
||||
import com.zmkg.coaloperation.utils.visible
|
||||
|
||||
class GeoPointMultiAdapter(list: MutableList<GeoPointMultiItem>):
|
||||
BaseMultiItemQuickAdapter<GeoPointMultiItem, BaseViewHolder>(list){
|
||||
@@ -43,7 +43,13 @@ class GeoPointMultiAdapter(list: MutableList<GeoPointMultiItem>):
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadUploadImage(holder: BaseViewHolder,item: GeoPointMultiItem) {}
|
||||
private fun loadUploadImage(holder: BaseViewHolder,item: GeoPointMultiItem) {
|
||||
val rvImageList = holder.itemView.findViewById<RecyclerView>(R.id.rvImageList)
|
||||
rvImageList.let {
|
||||
it.layoutManager = GridLayoutManager(it.context, 4, GridLayoutManager.VERTICAL, false)
|
||||
// it.adapter = GeoPointImageAdapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadCalculateInfo(holder: BaseViewHolder,item: GeoPointMultiItem) {}
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import com.zmkg.coaloperation.databinding.ActivityGeologicalPointBinding
|
||||
* 地质编录点新增
|
||||
*/
|
||||
class AddGeologicalPointActivity :
|
||||
BaseVMBActivity<TestViewModel, ActivityGeologicalPointBinding>(R.layout.activity_geological_point) {
|
||||
BaseVMBActivity<TestViewModel, ActivityGeologicalPointBinding>(R.layout.activity_add_geological_point) {
|
||||
|
||||
private val parentList: MutableList<GeoPointParent> = mutableListOf(
|
||||
GeoPointParent(name = "已编录点"),
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.zmkg.coaloperation.ui.geologging
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.zmkg.coaloperation.R
|
||||
import com.zmkg.coaloperation.adapter.GeoPointMultiAdapter
|
||||
import com.zmkg.coaloperation.base.BaseVMBFragment
|
||||
import com.zmkg.coaloperation.base.viewmodel.TestViewModel
|
||||
import com.zmkg.coaloperation.bean.GeoPointMultiItem
|
||||
import com.zmkg.coaloperation.databinding.FragmentAddGeologicalPointBinding
|
||||
|
||||
class AddGeologicalPointFragment :
|
||||
BaseVMBFragment<TestViewModel, FragmentAddGeologicalPointBinding>(R.layout.fragment_add_geological_point) {
|
||||
|
||||
private val geoPointList: MutableList<GeoPointMultiItem> = mutableListOf()
|
||||
private val geoPointAdapter by lazy {
|
||||
GeoPointMultiAdapter(geoPointList)
|
||||
}
|
||||
|
||||
override fun initView(root: View?, savedInstanceState: Bundle?) {
|
||||
geoPointList.run {
|
||||
add(GeoPointMultiItem(itemType = GeoPointMultiItem.TYPE_BASE_INFO))
|
||||
add(GeoPointMultiItem(itemType = GeoPointMultiItem.TYPE_LOGGING_INFO))
|
||||
add(GeoPointMultiItem(itemType = GeoPointMultiItem.TYPE_CALCULATE_INFO))
|
||||
add(GeoPointMultiItem(itemType = GeoPointMultiItem.TYPE_UPLOAD_IMAGE))
|
||||
}
|
||||
mBinding.rvPointList.let {
|
||||
it.layoutManager = LinearLayoutManager(it.context)
|
||||
it.adapter = geoPointAdapter
|
||||
}
|
||||
}
|
||||
|
||||
override fun bindEvent() {
|
||||
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,29 +17,97 @@
|
||||
android:id="@+id/toolbar_lay"
|
||||
layout="@layout/lay_title_right_bar" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPointList"
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/frgContainerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"
|
||||
tools:itemCount="2"
|
||||
tools:listitem="@layout/list_item_point_base_info" />
|
||||
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.allen.library.shape.ShapeButton
|
||||
android:id="@+id/btnSave"
|
||||
style="?android:attr/buttonBarButtonStyle"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:text="保存"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14sp"
|
||||
app:shapeCornersRadius="36dp"
|
||||
app:shapeSolidColor="#21A69A" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="#30E0A1"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
|
||||
<com.allen.library.shape.ShapeTextView
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="center"
|
||||
android:text="1#"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
app:shapeCornersRadius="8dp"
|
||||
app:shapeSolidColor="#1430E0A1" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?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>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:background="@color/black_bg">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPointList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="20dp"
|
||||
android:overScrollMode="never"
|
||||
tools:itemCount="2"
|
||||
tools:listitem="@layout/list_item_point_base_info" />
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@@ -20,6 +20,7 @@
|
||||
app:drawableStartCompat="@drawable/line_green" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvImageList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
|
||||
Reference in New Issue
Block a user