From ad52afc6bcdaad95583ef7c619bc8c5749e78d76 Mon Sep 17 00:00:00 2001 From: Linjiajia <319408893@qq.com> Date: 星期六, 18 三月 2023 03:58:19 +0800 Subject: [PATCH] 功能fragment标题栏 --- app/src/main/res/layout/fragment_function.xml | 42 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 41 insertions(+), 1 deletions(-) diff --git a/app/src/main/res/layout/fragment_function.xml b/app/src/main/res/layout/fragment_function.xml index 81522cf..c1375ea 100644 --- a/app/src/main/res/layout/fragment_function.xml +++ b/app/src/main/res/layout/fragment_function.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> -<layout xmlns:android="http://schemas.android.com/apk/res/android"> +<layout xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:android="http://schemas.android.com/apk/res/android"> <data> <variable @@ -11,5 +12,44 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + <com.hjq.bar.TitleBar + android:layout_width="match_parent" + android:layout_height="@dimen/dp_55" + app:layout_constraintTop_toTopOf="parent" + android:background="@color/color_title_background" + android:paddingHorizontal="@dimen/dp_16" + app:leftIcon="@drawable/ic_menu" + app:leftTitle="鍔熻兘" + app:leftTitleSize="@dimen/sp_20" + app:leftTitleColor="@color/white" + app:leftIconWidth="@dimen/dp_24" + app:leftIconHeight="@dimen/dp_24" + app:leftIconPadding="@dimen/dp_32" + app:leftHorizontalPadding="@dimen/dp_0" + app:rightIcon="@null" + > + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="end|center_vertical" + android:orientation="horizontal" > + + <ImageView + android:layout_width="@dimen/dp_24" + android:layout_height="@dimen/dp_24" + android:background="@drawable/ic_search" + /> + + <ImageView + android:layout_width="@dimen/dp_24" + android:layout_height="@dimen/dp_24" + android:background="@drawable/ic_operate" + android:layout_marginStart="@dimen/dp_16" + /> + + </LinearLayout> + </com.hjq.bar.TitleBar> + + </androidx.constraintlayout.widget.ConstraintLayout> </layout> \ No newline at end of file -- Gitblit v1.9.1