activity_main.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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. android:layout_width="match_parent"
  5. android:orientation="vertical"
  6. android:layout_height="match_parent"
  7. android:background="@color/colorPrimary">
  8. <androidx.viewpager2.widget.ViewPager2
  9. android:id="@+id/main_view_pager"
  10. android:layout_width="match_parent"
  11. android:layout_height="0dp"
  12. android:layout_weight="1"
  13. app:layout_constraintBottom_toTopOf="@id/v_tab_divider"
  14. app:layout_constraintTop_toTopOf="parent" />
  15. <View
  16. android:id="@+id/v_tab_divider"
  17. android:layout_width="match_parent"
  18. android:layout_height="1dp"
  19. android:background="#32333C"
  20. app:layout_constraintBottom_toTopOf="@+id/main_tab_layout" />
  21. <com.google.android.material.tabs.TabLayout
  22. android:id="@+id/main_tab_layout"
  23. android:layout_width="match_parent"
  24. android:layout_height="56dp"
  25. android:background="@color/colorPrimary"
  26. app:layout_constraintBottom_toBottomOf="parent"
  27. app:layout_constraintDimensionRatio="360:56"
  28. app:tabIconTint="@android:color/transparent"
  29. app:tabIndicator="@null" />
  30. </LinearLayout>