Last active
November 7, 2019 05:53
-
-
Save john-lorrenz/a952766b004d8207ae120abf0f3c5724 to your computer and use it in GitHub Desktop.
Complete layout template (Action bar - FrameLayout - Bottom Navigation)
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"?> | |
<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:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".Dashboard.DashboardActivity" | |
android:orientation="vertical"> | |
<androidx.appcompat.widget.Toolbar | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="@color/white" | |
android:layout_alignParentTop="true"> | |
<TextView | |
android:id="@+id/toolbar_title" | |
android:textSize="20dp" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center" | |
android:text="Date" | |
android:textColor="@color/colorPrimaryDark"/> | |
<TextView | |
android:id="@+id/toolbar_title_2" | |
android:textSize="20dp" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="center" | |
android:text="Filipina" | |
android:textStyle="bold" | |
android:textColor="@color/colorPrimaryDark"/> | |
</androidx.appcompat.widget.Toolbar> | |
<FrameLayout | |
android:id="@+id/frame_layout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_above="@id/bottom_nav" | |
android:layout_below="@+id/toolbar"></FrameLayout> | |
<com.google.android.material.bottomnavigation.BottomNavigationView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:id="@+id/bottom_nav" | |
android:layout_alignParentBottom="true" | |
app:menu="@menu/bottom_nav_dashboard"/> | |
</RelativeLayout> |
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
implementation 'com.google.android.material:material:1.0.0' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment