Magisk/app/src/main/res/layout/activity_main_md2.xml

92 lines
3.7 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<data>
<variable
name="viewModel"
type="com.topjohnwu.magisk.redesign.MainViewModel" />
</data>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-10-03 17:31:45 +02:00
android:orientation="vertical"
android:paddingLeft="@{viewModel.insets.left}"
android:paddingRight="@{viewModel.insets.right}"
tools:ignore="RtlHardcoded">
<com.google.android.material.appbar.AppBarLayout
style="?styleAppbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
2019-10-03 17:31:45 +02:00
android:background="?colorSurfaceVariant"
android:paddingTop="@{viewModel.insets.top}"
tools:paddingTop="24dp">
<com.google.android.material.appbar.MaterialToolbar
2019-10-03 17:31:45 +02:00
android:id="@+id/main_toolbar"
style="?styleToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
tools:title="Home" />
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_gravity="start|bottom"
android:background="@drawable/bg_accent" />
</com.google.android.material.appbar.AppBarLayout>
2019-10-03 17:31:45 +02:00
<FrameLayout
android:id="@+id/main_nav_host"
android:layout_width="match_parent"
android:layout_height="match_parent"
2019-10-03 17:31:45 +02:00
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
<com.google.android.material.bottomappbar.BottomAppBar
2019-10-03 17:31:45 +02:00
android:id="@+id/main_bottom_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="?colorSurface"
2019-10-03 17:31:45 +02:00
android:paddingBottom="@{viewModel.insets.bottom}"
app:backgroundTint="?colorSurface"
app:contentInsetEnd="0dp"
app:contentInsetStart="0dp"
app:fabCradleMargin="@dimen/l_50"
2019-10-03 17:31:45 +02:00
app:hideOnScroll="true"
tools:paddingBottom="48dp">
<com.google.android.material.bottomnavigation.BottomNavigationView
2019-10-03 17:31:45 +02:00
android:id="@+id/main_navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:elevation="0dp"
app:itemIconTint="@color/color_menu_tint"
app:itemTextAppearanceActive="@style/AppearanceFoundation.Tiny.Bold"
app:itemTextAppearanceInactive="@style/AppearanceFoundation.Tiny.Bold"
app:itemTextColor="@color/color_menu_tint"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/menu_bottom_nav" />
</com.google.android.material.bottomappbar.BottomAppBar>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="@{viewModel.insets.bottom + (int) @dimen/l1}"
app:fabSize="normal"
2019-10-03 17:31:45 +02:00
app:layout_anchor="@+id/main_bottom_bar"
2019-10-04 18:25:06 +02:00
app:srcCompat="@drawable/ic_superuser_md2" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>