Skip to content

Instantly share code, notes, and snippets.

@kasem-sm
Created June 30, 2021 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kasem-sm/89267fbf0b008d3e7cde61149177a7e8 to your computer and use it in GitHub Desktop.
Save kasem-sm/89267fbf0b008d3e7cde61149177a7e8 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/bottom_nav">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@color/color_background"
app:elevation="0dp">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:subtitleTextAppearance="@style/SubtitleText"
app:titleTextAppearance="@style/TitleText" />
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:alpha="0.8"
android:background="?android:dividerVertical" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_container"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
app:defaultNavHost="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
app:navGraph="@navigation/navigations" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_above="@+id/bottom_nav"
android:alpha="0.8"
android:background="?android:dividerVertical" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/color_background"
app:elevation="0dp"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/menu_bottom_nav" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment