|
|
|
|
@ -24,28 +24,30 @@
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:background="@drawable/list_background">
|
|
|
|
|
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent">
|
|
|
|
|
|
|
|
|
|
<!-- AppBarLayout:替代传统 ActionBar -->
|
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
|
android:id="@+id/appbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:theme="@style/ThemeOverlay.Material3.ActionBar">
|
|
|
|
|
|
|
|
|
|
<!-- Toolbar:现代替代 ActionBar 的标准组件,带汉堡菜单按钮 -->
|
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
|
|
|
android:id="@+id/toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
|
app:title="@string/app_name"
|
|
|
|
|
app:navigationIcon="@android:drawable/ic_menu_sort_by_size"
|
|
|
|
|
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
|
|
|
|
|
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:fitsSystemWindows="true">
|
|
|
|
|
|
|
|
|
|
<!-- AppBarLayout:替代传统 ActionBar -->
|
|
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
|
android:id="@+id/appbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:theme="@style/ThemeOverlay.Material3.ActionBar"
|
|
|
|
|
android:fitsSystemWindows="true">
|
|
|
|
|
|
|
|
|
|
<!-- Toolbar:现代替代 ActionBar 的标准组件,带汉堡菜单按钮 -->
|
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
|
|
|
|
android:id="@+id/toolbar"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="?attr/actionBarSize"
|
|
|
|
|
app:title="@string/app_name"
|
|
|
|
|
app:navigationIcon="@android:drawable/ic_menu_sort_by_size"
|
|
|
|
|
app:layout_scrollFlags="scroll|enterAlways|snap" />
|
|
|
|
|
|
|
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
|
|
|
|
|
<!-- 便签列表:使用 NestedScrollView 包裹 ListView 以支持滚动 -->
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
|
|