Last active
June 17, 2019 08:14
-
-
Save adityawid/77a61d1ca6db7a0067404ea58082cc31 to your computer and use it in GitHub Desktop.
navigation component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:id="@+id/container" | |
tools:context=".MainActivity"> | |
<androidx.appcompat.widget.Toolbar | |
android:id="@+id/main_toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?colorPrimary" | |
android:theme="@style/ToolbarTheme"/> | |
<fragment | |
android:id="@+id/nav_host_fragment" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="1" | |
android:name="androidx.navigation.fragment.NavHostFragment" | |
app:navGraph="@navigation/bottom_nav_graph" | |
app:defaultNavHost="true" /> | |
<com.google.android.material.bottomnavigation.BottomNavigationView | |
android:id="@+id/bottom_nav" | |
android:visibility="gone" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginEnd="0dp" | |
android:layout_marginStart="0dp" | |
android:background="?android:attr/windowBackground" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintLeft_toLeftOf="parent" | |
app:layout_constraintRight_toRightOf="parent" | |
app:menu="@menu/navigation"/> | |
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> | |
</style> | |
<!-- Base toolbar theme. --> | |
<style name="ToolbarTheme" parent="ThemeOverlay.MaterialComponents.ActionBar"> | |
<item name="android:textColorPrimary">@android:color/white</item> | |
<item name="android:textColorSecondary">#EEEEEE</item> | |
</style> | |
</resources> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment