| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <com.google.android.material.appbar.AppBarLayout
- android:id="@+id/app_bar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:fitsSystemWindows="true"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent">
- <com.google.android.material.appbar.MaterialToolbar
- android:id="@+id/top_bar"
- android:layout_width="match_parent"
- android:layout_height="?attr/actionBarSize"
- app:layout_collapseMode="pin"
- app:navigationIcon="@drawable/ic_arrow_back"
- app:title="@string/chapter_list" />
- <com.google.android.material.tabs.TabLayout
- android:id="@+id/tab_layout"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginHorizontal="16dp"
- android:background="?attr/colorSurface"
- app:tabGravity="fill"
- app:tabMode="fixed" />
- </com.google.android.material.appbar.AppBarLayout>
- <!-- ViewPager 作为滚动内容 -->
- <androidx.viewpager.widget.ViewPager
- android:id="@+id/view_pager"
- android:layout_width="match_parent"
- android:layout_height="0dp"
- app:layout_behavior="@string/appbar_scrolling_view_behavior"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintTop_toBottomOf="@id/app_bar" />
- </androidx.constraintlayout.widget.ConstraintLayout>
|