You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

activity_main.xml 1.6KB

123456789101112131415161718192021222324252627282930313233343536
  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:id="@+id/container"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. app:layout_constraintBottom_toTopOf="@+id/nav_view"
  8. app:layout_constraintLeft_toLeftOf="parent"
  9. app:layout_constraintRight_toRightOf="parent"
  10. app:layout_constraintTop_toTopOf="parent">
  11. <com.google.android.material.bottomnavigation.BottomNavigationView
  12. android:id="@+id/nav_view"
  13. android:layout_width="0dp"
  14. android:layout_height="wrap_content"
  15. android:layout_marginStart="0dp"
  16. android:layout_marginEnd="0dp"
  17. android:background="?android:attr/windowBackground"
  18. app:layout_constraintBottom_toBottomOf="parent"
  19. app:layout_constraintLeft_toLeftOf="parent"
  20. app:layout_constraintRight_toRightOf="parent"
  21. app:menu="@menu/bottom_nav_menu" />
  22. <fragment
  23. android:id="@+id/nav_host_fragment"
  24. android:name="androidx.navigation.fragment.NavHostFragment"
  25. android:layout_width="match_parent"
  26. android:layout_height="0dp"
  27. app:defaultNavHost="true"
  28. app:layout_constraintBottom_toTopOf="@+id/nav_view"
  29. app:layout_constraintLeft_toLeftOf="parent"
  30. app:layout_constraintRight_toRightOf="parent"
  31. app:layout_constraintTop_toTopOf="parent"
  32. app:navGraph="@navigation/mobile_navigation" />
  33. </androidx.constraintlayout.widget.ConstraintLayout>