Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DmitriySosnovskiy/bde41517004b2201095f0e2fcc461f14 to your computer and use it in GitHub Desktop.
Save DmitriySosnovskiy/bde41517004b2201095f0e2fcc461f14 to your computer and use it in GitHub Desktop.
Разметка activity
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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=".ui.RootActivity">
<!-- fitsSystemWindows for correct inset with windowTranslucentStatus -->
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:elevation="0dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<TextView
android:id="@+id/tv_toolbar_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fontFamily="@font/calibri_bold"
android:gravity="center"
android:textAllCaps="true"
android:textSize="@dimen/text_size_normal_16"
tools:text="Title" />
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
style="@style/ToolbarStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:background="@color/transparent"
android:elevation="0dp"
android:theme="@style/BarsTheme" />
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout>
<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:navGraph="@navigation/navigation_graph" />
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment