activity_chapter_list.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent">
  6. <com.google.android.material.appbar.AppBarLayout
  7. android:id="@+id/app_bar"
  8. android:layout_width="match_parent"
  9. android:layout_height="wrap_content"
  10. android:fitsSystemWindows="true"
  11. app:layout_constraintEnd_toEndOf="parent"
  12. app:layout_constraintStart_toStartOf="parent"
  13. app:layout_constraintTop_toTopOf="parent">
  14. <com.google.android.material.appbar.MaterialToolbar
  15. android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
  16. android:id="@+id/top_bar"
  17. android:layout_width="match_parent"
  18. android:layout_height="?attr/actionBarSize"
  19. app:layout_collapseMode="pin"
  20. app:navigationIcon="@drawable/ic_arrow_back"
  21. app:title="" />
  22. <LinearLayout
  23. android:layout_width="match_parent"
  24. android:layout_height="wrap_content"
  25. android:layout_marginHorizontal="16dp">
  26. <com.google.android.material.tabs.TabLayout
  27. android:id="@+id/tab_layout"
  28. android:layout_width="0dp"
  29. android:layout_height="wrap_content"
  30. android:layout_weight="1"
  31. android:background="?attr/colorSurface"
  32. app:tabGravity="fill"
  33. app:tabMode="fixed" />
  34. <com.google.android.material.button.MaterialButton
  35. android:layout_width="32dp"
  36. android:layout_height="32dp"
  37. android:clickable="true"
  38. android:checkable="true"
  39. app:icon="@drawable/ic_toc"
  40. style="@style/Widget.Material3Expressive.Button.IconButton.Tonal"/>
  41. </LinearLayout>
  42. </com.google.android.material.appbar.AppBarLayout>
  43. <!-- ViewPager 作为滚动内容 -->
  44. <androidx.viewpager.widget.ViewPager
  45. android:id="@+id/view_pager"
  46. android:layout_width="match_parent"
  47. android:layout_height="0dp"
  48. app:layout_behavior="@string/appbar_scrolling_view_behavior"
  49. app:layout_constraintBottom_toBottomOf="parent"
  50. app:layout_constraintTop_toBottomOf="@id/app_bar" />
  51. </androidx.constraintlayout.widget.ConstraintLayout>