From 7475bfeadee82878faf2188665ae5ae83875835c Mon Sep 17 00:00:00 2001 From: Administrator <123> Date: Mon, 25 Oct 2021 09:50:29 +0000 Subject: [PATCH] 大厅UI布局 我的UI布局 --- app/src/main/res/layout/fragment_dashboard.xml | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 100 insertions(+), 11 deletions(-) diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index 0ef53b9..377b41f 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -7,17 +7,106 @@ android:layout_height="match_parent" tools:context=".ui.dashboard.DashboardFragment" > - <TextView - android:id="@+id/text_dashboard" + <com.google.android.material.tabs.TabLayout + android:id="@+id/tablayout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:textAlignment="center" - android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="全部" /> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="人气" /> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="简单" /> + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="高价" /> + </com.google.android.material.tabs.TabLayout> + + <RadioGroup + android:id="@+id/radio_group" + android:layout_width="0dp" + android:layout_height="40dp" + app:layout_constraintHorizontal_chainStyle="spread" + app:layout_constraintHorizontal_weight="4" + app:layout_constraintTop_toBottomOf="@id/tablayout" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/check_classify" + android:orientation="horizontal"> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="综合" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="最新" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="价格" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="人气" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + + </RadioGroup> + + <com.google.android.material.checkbox.MaterialCheckBox + android:id="@+id/check_classify" + android:layout_width="0dp" + android:layout_height="40dp" + android:button="@null" + android:text="分类▼" + android:gravity="center" + android:textColor="@color/radio_text" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/tablayout" + app:layout_constraintLeft_toRightOf="@id/radio_group" + app:layout_constraintHorizontal_weight="1" + app:layout_constraintHorizontal_chainStyle="spread" /> + + <View + android:id="@+id/view" + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:background="@color/gray" + app:layout_constraintTop_toBottomOf="@id/radio_group" + app:layout_constraintLeft_toLeftOf="parent"/> + + <FrameLayout + android:id="@+id/framelayout" + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file -- Gitblit v1.9.1