UI美化质检报告页面
This commit is contained in:
parent
9929423a3b
commit
0ac805302d
@ -29,9 +29,11 @@ class LeftAdapter(private var itemListener: ((Int, String) -> Unit?)? = null) :
|
||||
val title = data[position]
|
||||
bd.itemId.text = title
|
||||
if (selectTitle == title) {
|
||||
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.cv_gray_153))
|
||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_tittle_blue_bg_4_radius)
|
||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.highFontColor))
|
||||
} else {
|
||||
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.white))
|
||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
|
||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
||||
}
|
||||
bd.root.setOnClickListener {
|
||||
if (selectTitle != title) {
|
||||
|
@ -28,10 +28,15 @@ class MiddleAdapter(private var itemListener: ((Int, String) -> Unit?)? = null)
|
||||
val bd = holder.viewBinding as TextItemSelectBinding
|
||||
val title = data[position]
|
||||
bd.itemId.text = title
|
||||
val layoutParams: ViewGroup.LayoutParams = holder.viewBinding.itemLayout.layoutParams
|
||||
layoutParams.width = 115
|
||||
bd.itemLayout.layoutParams = layoutParams
|
||||
if (selectTitle == title) {
|
||||
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.cv_gray_153))
|
||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_blue_bg_4_radius)
|
||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.white))
|
||||
} else {
|
||||
bd.itemId.setBackgroundColor(holder.viewBinding.root.context.getColor(R.color.white))
|
||||
bd.itemId.setBackgroundResource(R.drawable.drawable_bg_white_bg_4_radius)
|
||||
bd.itemId.setTextColor(holder.viewBinding.root.context.getColor(R.color.black))
|
||||
}
|
||||
bd.root.setOnClickListener {
|
||||
if (selectTitle != title) {
|
||||
|
@ -102,7 +102,8 @@ class PhenomenonFragment :
|
||||
|
||||
//中间菜单
|
||||
binding.phenomenonMiddleRecyclerview.setHasFixedSize(true)
|
||||
binding.phenomenonMiddleRecyclerview.layoutManager = LinearLayoutManager(requireContext())
|
||||
binding.phenomenonMiddleRecyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
|
||||
binding.phenomenonMiddleRecyclerview.adapter = middleAdapter
|
||||
//中间侧菜单查询结果监听
|
||||
viewModel.liveDataMiddleTypeList.observe(viewLifecycleOwner) {
|
||||
|
@ -5,15 +5,19 @@ import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Rect
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.recyclerview.widget.RecyclerView.ItemDecoration
|
||||
import com.navinfo.omqs.R
|
||||
|
||||
|
||||
/**
|
||||
* 自定义装饰器(实现分组+吸顶效果)
|
||||
*/
|
||||
@RequiresApi(Build.VERSION_CODES.M)
|
||||
class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
|
||||
//头部的高
|
||||
private val mItemHeaderHeight: Int
|
||||
@ -31,7 +35,7 @@ class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
|
||||
mTextPaddingLeft = dp2px(context, 6f)
|
||||
mTextRect = Rect()
|
||||
mItemHeaderPaint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||
mItemHeaderPaint.color = Color.GRAY
|
||||
mItemHeaderPaint.color = context.getColor(R.color.btn_bg_blue)
|
||||
mTextPaint = Paint(Paint.ANTI_ALIAS_FLAG)
|
||||
mTextPaint.textSize = 46f
|
||||
mTextPaint.color = Color.WHITE
|
||||
@ -84,7 +88,6 @@ class RightGroupHeaderDecoration(context: Context) : ItemDecoration() {
|
||||
(view.top - 1).toFloat(), right.toFloat(),
|
||||
view.top.toFloat(), mLinePaint
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="@color/blue" />
|
||||
<solid android:color="@color/btn_bg_blue" />
|
||||
<corners
|
||||
android:bottomLeftRadius="5dp"
|
||||
android:bottomRightRadius="5dp"
|
||||
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="@color/high_item_color" />
|
||||
<corners
|
||||
android:bottomLeftRadius="5dp"
|
||||
android:bottomRightRadius="5dp"
|
||||
android:topLeftRadius="5dp"
|
||||
android:topRightRadius="5dp" />
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp"/>
|
||||
</shape>
|
14
app/src/main/res/drawable/drawable_bg_white_bg_4_radius.xml
Normal file
14
app/src/main/res/drawable/drawable_bg_white_bg_4_radius.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<solid android:color="@color/white" />
|
||||
<corners
|
||||
android:bottomLeftRadius="5dp"
|
||||
android:bottomRightRadius="5dp"
|
||||
android:topLeftRadius="5dp"
|
||||
android:topRightRadius="5dp" />
|
||||
<padding
|
||||
android:bottom="1dp"
|
||||
android:left="1dp"
|
||||
android:right="1dp"
|
||||
android:top="1dp"/>
|
||||
</shape>
|
BIN
app/src/main/res/drawable/icon_item_high_bg.9.png
Normal file
BIN
app/src/main/res/drawable/icon_item_high_bg.9.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 840 B |
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_enabled="false" android:drawable="@drawable/shade_btn_gray_bg_4_radius_hd"></item>
|
||||
<item android:state_checked="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"/>
|
||||
<item android:state_pressed="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"/>
|
||||
<item android:state_selected="true" android:drawable="@drawable/drawable_bg_blue_bg_4_radius"></item>
|
||||
<item android:drawable="@drawable/drawable_bg_white_bg_4_radius"/>
|
||||
|
||||
</selector>
|
@ -133,7 +133,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
tools:ignore="MissingConstraints">
|
||||
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/main_activity_voice"
|
||||
android:layout_width="48dp"
|
||||
@ -178,7 +177,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHorizontal_weight="2.5"
|
||||
app:layout_constraintHorizontal_weight="2"
|
||||
app:layout_constraintLeft_toRightOf="@id/main_activity_middle_fragment"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -5,7 +5,8 @@
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="right|center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="30dp"
|
||||
android:paddingTop="64dp"
|
||||
android:paddingLeft="380dp"
|
||||
tools:context="com.navinfo.omqs.ui.fragment.evaluationresult.PhenomenonFragment">
|
||||
|
||||
<ImageView
|
||||
@ -25,42 +26,37 @@
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/phenomenon_title_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="65dp"
|
||||
android:background="@color/default_blue"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:text="问题列表"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/phenomenon_left_recyclerview"
|
||||
<RelativeLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:background="@color/white" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/phenomenon_middle_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_below="@id/phenomenon_middle_recyclerview"
|
||||
android:id="@+id/phenomenon_left_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/phenomenon_middle_recyclerview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/white" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/phenomenon_right_recyclerview"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="4"
|
||||
android:layout_weight="3"
|
||||
android:background="@color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
@ -1,11 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/item_id"
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/item_layout"
|
||||
android:background="@color/white"
|
||||
android:layout_width="match_parent"
|
||||
android:gravity="center"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</TextView>
|
||||
<TextView
|
||||
android:id="@+id/item_id"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="3dp"
|
||||
android:padding = "3dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="18sp">
|
||||
|
||||
</TextView>
|
||||
|
||||
</RelativeLayout>
|
@ -163,7 +163,8 @@
|
||||
<color name="cv_gray_153">#999999</color>
|
||||
<color name="cvm_red">#FF3B30</color>
|
||||
<color name="btn_blue_solid">#108ee9</color>
|
||||
<color name="titleColor">#2631DD</color>
|
||||
<color name="highFontColor">#2631DD</color>
|
||||
<color name="high_item_color">#FFF5F7FE</color>
|
||||
<color name="contentColor">#000000</color>
|
||||
<!-- 一键连接对话框背景色 -->
|
||||
<color name="bg_gray2">#d1d1d1</color>
|
||||
@ -171,5 +172,6 @@
|
||||
<color name="bg_dark">#999999</color>
|
||||
<color name="gray_121">#797979</color>
|
||||
<color name="gray_59">#595959</color>
|
||||
<color name="btn_bg_blue">#FF3266F1</color>
|
||||
<color name="text_hint_gray" comment="输入框内默认字体颜色,输入框边框颜色">#c1c1c1</color>
|
||||
</resources>
|
@ -27,7 +27,7 @@
|
||||
<style name="card_title_font_default">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:textSize">@dimen/card_title_font_size</item>
|
||||
<item name="android:textColor">@color/titleColor</item>
|
||||
<item name="android:textColor">@color/highFontColor</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
</style>
|
||||
@ -46,7 +46,7 @@
|
||||
<style name="card_text_font_default">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:textSize">@dimen/card_title_font_2size</item>
|
||||
<item name="android:textColor">@color/titleColor</item>
|
||||
<item name="android:textColor">@color/highFontColor</item>
|
||||
<item name="android:padding">10dp</item>
|
||||
<item name="android:drawableRight">@drawable/icon_down_arrow</item>
|
||||
<item name="android:background">@drawable/fm_card_map_down_status_bg</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user