style(ui): 统一界面组件样式并优化设置页面交互
- 为所有列表项和设置面板应用统一的白色圆角背景样式 - 为可点击区域添加波纹效果提升用户体验 - 修复布局文件中ID命名不规范的问题 - 在设置页面添加右上角功能按钮并实现跳转逻辑 - 导入页面跳转扩展函数支持快速导航到主秤配置页面 - 优化布局参数确保界面元素正确显示和交互响应
This commit is contained in:
@@ -15,6 +15,7 @@ import com.shuwei.dish.match.dialog.CommonDialog
|
||||
import com.shuwei.dish.match.utils.SpTool
|
||||
import com.shuwei.dish.match.utils.ext.clickWithDebounce
|
||||
import com.shuwei.dish.match.utils.ext.gone
|
||||
import com.shuwei.dish.match.utils.ext.startActivity
|
||||
import com.shuwei.dish.match.utils.ext.visible
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,10 @@ class SettingActivity : BaseActivity() {
|
||||
}, titleAction = {
|
||||
it.text = "设备设置"
|
||||
}, rightIconActon = {
|
||||
it.gone()
|
||||
it.visible()
|
||||
it.clickWithDebounce {
|
||||
startActivity<MasterScaleActivity>()
|
||||
}
|
||||
})
|
||||
|
||||
initView()
|
||||
|
||||
@@ -8,13 +8,16 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_cook_mode"
|
||||
android:id="@+id/llCookMode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="120dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:background="@drawable/shape_scale_cell">
|
||||
android:background="@drawable/shape_white_e6_12_corners"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -52,7 +55,9 @@
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/shape_scale_cell">
|
||||
android:background="@drawable/shape_white_e6_12_corners"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
@@ -81,7 +86,9 @@
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@drawable/shape_scale_cell">
|
||||
android:background="@drawable/shape_white_e6_12_corners"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -94,6 +94,8 @@
|
||||
android:background="@drawable/shape_scale_cell"
|
||||
android:gravity="center"
|
||||
android:text="-"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:clipToOutline="true"
|
||||
android:textColor="@color/home_title"
|
||||
android:textSize="28sp" />
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:padding="4dp"
|
||||
android:background="@drawable/shape_scale_cell">
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="@drawable/shape_scale_cell"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAddress"
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="340dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="@drawable/shape_scale_cell"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingBottom="8dp">
|
||||
android:paddingBottom="8dp"
|
||||
android:clipToOutline="true">
|
||||
|
||||
<!-- 秤编号 -->
|
||||
<TextView
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginBottom="2dp"
|
||||
android:clipToOutline="true"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:background="@drawable/shape_scale_cell">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="5dp">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user