fix(ui): 修复界面文本显示和布局问题
- 将"餐品模式"统一修改为"菜品模式" - 优化列表项布局结构,使用ConstraintLayout替代LinearLayout - 调整间距属性,将marginTop改为layout_marginVertical - 重新设置文本和图标的位置约束关系 - 添加多点击检测器用于快速跳转到主页面的临时功能
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="餐品模式"
|
||||
android:text="菜品模式"
|
||||
android:textSize="32sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginStart="32dp"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/tvLockRemind"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:text="@string/lock_remind"
|
||||
android:textColor="@color/lock_remind"
|
||||
android:textSize="26sp"
|
||||
@@ -22,14 +22,14 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginStart="60dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginVertical="15dp"
|
||||
android:layout_marginEnd="60dp"
|
||||
app:cardBackgroundColor="@color/white"
|
||||
app:cardCornerRadius="30dp"
|
||||
app:cardElevation="0dp"
|
||||
app:rippleColor="#B0BEC5">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
@@ -46,44 +46,48 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start|center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvModeName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
tools:text="@string/mode_cook"
|
||||
app:layout_constraintStart_toEndOf="@id/ivModeIcon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tvModeDesc"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ivRightIcon"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:textColor="@color/mode_name"
|
||||
android:textSize="36sp"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvModeDesc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="16dp"
|
||||
app:layout_constraintStart_toStartOf="@id/tvModeName"
|
||||
app:layout_constraintEnd_toEndOf="@id/tvModeName"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvModeName"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:maxLines="1"
|
||||
tools:text="@string/cook_mode_desc"
|
||||
android:textColor="@color/mode_desc"
|
||||
android:textSize="26sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivRightIcon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:src="@drawable/ic_arrow_right"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
Reference in New Issue
Block a user