common_tabbed_sheet.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="wrap_content"
  7. android:orientation="vertical">
  8. <androidx.constraintlayout.widget.ConstraintLayout
  9. android:layout_width="match_parent"
  10. android:layout_height="wrap_content">
  11. <!-- Remove background color so rounded sheet corners work -->
  12. <com.google.android.material.tabs.TabLayout
  13. android:id="@+id/tabs"
  14. style="@style/Theme.Widget.Tabs"
  15. android:layout_width="0dp"
  16. android:layout_height="wrap_content"
  17. android:background="@android:color/transparent"
  18. app:layout_constraintBottom_toBottomOf="parent"
  19. app:layout_constraintEnd_toStartOf="@+id/menu"
  20. app:layout_constraintStart_toStartOf="parent"
  21. app:layout_constraintTop_toTopOf="parent"
  22. app:tabTextColor="@color/tabs_selector_background"
  23. app:tabIndicatorColor="?attr/colorAccent"
  24. app:tabGravity="fill"
  25. app:tabMode="fixed" />
  26. <ImageButton
  27. android:id="@+id/menu"
  28. android:layout_width="0dp"
  29. android:layout_height="wrap_content"
  30. android:background="?selectableItemBackgroundBorderless"
  31. android:contentDescription="@string/action_menu"
  32. android:paddingStart="10dp"
  33. android:paddingEnd="10dp"
  34. android:visibility="gone"
  35. app:layout_constraintBottom_toBottomOf="parent"
  36. app:layout_constraintEnd_toEndOf="parent"
  37. app:layout_constraintTop_toTopOf="parent"
  38. app:srcCompat="@drawable/ic_more_vert_24dp"
  39. app:tint="?attr/colorOnPrimary"
  40. tools:visibility="visible" />
  41. </androidx.constraintlayout.widget.ConstraintLayout>
  42. <androidx.viewpager.widget.ViewPager
  43. android:id="@+id/pager"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content" />
  46. </LinearLayout>