activity_main.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent">
  7. <com.google.android.material.appbar.MaterialToolbar
  8. android:id="@+id/toolbar"
  9. android:layout_width="0dp"
  10. android:layout_height="wrap_content"
  11. app:layout_constraintTop_toTopOf="parent"
  12. app:layout_constraintLeft_toLeftOf="parent"
  13. app:layout_constraintWidth_percent="1" />
  14. <com.google.android.material.tabs.TabLayout
  15. android:id="@+id/main_tabs"
  16. android:background="?attr/colorSurfaceVariant"
  17. android:layout_width="match_parent"
  18. android:layout_height="wrap_content"
  19. android:visibility="gone"
  20. app:tabTextColor="?attr/colorOnSurfaceVariant"
  21. app:tabSelectedTextColor="?attr/colorOnSurfaceVariant"
  22. app:layout_constraintTop_toBottomOf="@id/toolbar"
  23. app:layout_constraintStart_toStartOf="parent" />
  24. <ProgressBar
  25. android:id="@+id/loading"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content"
  28. android:indeterminate="true"
  29. app:layout_constraintStart_toStartOf="parent"
  30. app:layout_constraintEnd_toEndOf="parent"
  31. app:layout_constraintTop_toBottomOf="@id/main_tabs"
  32. app:layout_constraintBottom_toBottomOf="parent" />
  33. <androidx.viewpager2.widget.ViewPager2
  34. android:id="@+id/view_pager"
  35. android:layout_width="0dp"
  36. android:layout_height="0dp"
  37. android:visibility="gone"
  38. app:layout_constraintBottom_toBottomOf="parent"
  39. app:layout_constraintLeft_toLeftOf="parent"
  40. app:layout_constraintRight_toRightOf="parent"
  41. app:layout_constraintTop_toBottomOf="@id/main_tabs"/>
  42. </androidx.constraintlayout.widget.ConstraintLayout>