调整UI
调整道路属性面板
This commit is contained in:
@@ -60,7 +60,7 @@ class MainActivity : BaseActivity() {
|
||||
private val signAdapter by lazy {
|
||||
SignAdapter { position, signBean ->
|
||||
rightController.currentDestination?.let {
|
||||
if (it.id == R.id.EmptyFragment) {
|
||||
if (it.id == R.id.RightEmptyFragment) {
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable("SignBean", signBean)
|
||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
@@ -75,7 +75,7 @@ class MainActivity : BaseActivity() {
|
||||
private val topSignAdapter by lazy {
|
||||
TopSignAdapter { position, signBean ->
|
||||
rightController.currentDestination?.let {
|
||||
if (it.id == R.id.EmptyFragment) {
|
||||
if (it.id == R.id.RightEmptyFragment) {
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable("SignBean", signBean)
|
||||
rightController.navigate(R.id.EvaluationResultFragment, bundle)
|
||||
@@ -147,9 +147,9 @@ class MainActivity : BaseActivity() {
|
||||
this,
|
||||
RecyclerView.HORIZONTAL, false
|
||||
)
|
||||
binding.mainActivityTopSignRecyclerview.addItemDecoration(
|
||||
RecycleViewDivider(this, LinearLayoutManager.HORIZONTAL)
|
||||
)
|
||||
// binding.mainActivityTopSignRecyclerview.addItemDecoration(
|
||||
// RecycleViewDivider(this, LinearLayoutManager.HORIZONTAL)
|
||||
// )
|
||||
binding.mainActivityTopSignRecyclerview.adapter = topSignAdapter
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*展开或收起右侧面板
|
||||
*/
|
||||
fun onSwitchFragment() {
|
||||
switchFragment = !switchFragment
|
||||
@@ -288,6 +288,13 @@ class MainActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏或显示右侧展开按钮
|
||||
*/
|
||||
fun setRightSwitchButton(visibility: Int) {
|
||||
binding.mainActivityFragmentSwitch.visibility = visibility
|
||||
}
|
||||
|
||||
/**
|
||||
* 点击录音按钮
|
||||
*/
|
||||
|
||||
@@ -223,7 +223,7 @@ class MainViewModel @Inject constructor(
|
||||
)
|
||||
|
||||
when (element.code) {
|
||||
2041, 2008 -> topSignList.add(
|
||||
2041, 2008, 2010 -> topSignList.add(
|
||||
signBean
|
||||
)
|
||||
else -> signList.add(
|
||||
@@ -386,8 +386,7 @@ class MainViewModel @Inject constructor(
|
||||
if (layerConfigList != null && !layerConfigList.isEmpty()) {
|
||||
val omdbVisibleList = layerConfigList.filter { importConfig ->
|
||||
importConfig.tableGroupName == "OMDB数据"
|
||||
}.first().tableMap.filter {
|
||||
entry ->
|
||||
}.first().tableMap.filter { entry ->
|
||||
val tableInfo = entry.value
|
||||
!tableInfo.checked
|
||||
}.map { entry ->
|
||||
@@ -426,7 +425,7 @@ class MainViewModel @Inject constructor(
|
||||
// }
|
||||
// }
|
||||
when (navDestination.id) {
|
||||
R.id.EmptyFragment -> {
|
||||
R.id.RightEmptyFragment -> {
|
||||
if (list.size == 1) {
|
||||
val bundle = Bundle()
|
||||
bundle.putString("QsId", list[0])
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.navinfo.omqs.ui.activity.map
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import com.navinfo.omqs.R
|
||||
import com.navinfo.omqs.bean.SignBean
|
||||
@@ -27,6 +28,36 @@ class TopSignAdapter(private var itemListener: ((Int, SignBean) -> Unit?)? = nul
|
||||
bd.topSignText.background = holder.viewBinding.root.context.getDrawable(item.iconId)
|
||||
bd.topSignName.text = item.name
|
||||
bd.topSignText.text = item.iconText
|
||||
if (data.size == 1) {
|
||||
bd.topSignLeftLine.visibility = View.GONE
|
||||
bd.topSignRightLine.visibility = View.GONE
|
||||
bd.topSignName.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_top_bg)
|
||||
bd.topSignText.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_bottom_bg)
|
||||
} else if (position == 0) {
|
||||
bd.topSignLeftLine.visibility = View.GONE
|
||||
bd.topSignRightLine.visibility = View.VISIBLE
|
||||
bd.topSignName.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_left_top_bg)
|
||||
bd.topSignText.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_left_bottom_bg)
|
||||
} else if (position == data.size - 1) {
|
||||
bd.topSignLeftLine.visibility = View.VISIBLE
|
||||
bd.topSignRightLine.visibility = View.GONE
|
||||
bd.topSignName.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_right_top_bg)
|
||||
bd.topSignText.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_right_bottom_bg)
|
||||
} else {
|
||||
bd.topSignLeftLine.visibility = View.VISIBLE
|
||||
bd.topSignRightLine.visibility = View.VISIBLE
|
||||
bd.topSignName.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_middle_top_bg)
|
||||
bd.topSignText.background =
|
||||
holder.viewBinding.root.context.getDrawable(R.drawable.shape_road_info_middle_bottom_bg)
|
||||
}
|
||||
|
||||
bd.root.setOnClickListener {
|
||||
itemListener?.invoke(position, item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user