2019-10-02 17:42:38 +00:00
|
|
|
<?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 15:31:45 +00:00
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingLeft="@{viewModel.insets.left}"
|
|
|
|
android:paddingRight="@{viewModel.insets.right}"
|
|
|
|
tools:ignore="RtlHardcoded">
|
2019-10-02 17:42:38 +00:00
|
|
|
|
2019-10-05 20:51:21 +00:00
|
|
|
<FrameLayout
|
|
|
|
android:id="@+id/main_nav_host"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent" />
|
|
|
|
|
2019-10-22 16:08:57 +00:00
|
|
|
<com.google.android.material.appbar.AppBarLayout
|
|
|
|
android:id="@+id/main_toolbar_wrapper"
|
|
|
|
style="?styleAppbar"
|
2019-10-02 17:42:38 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-22 16:08:57 +00:00
|
|
|
android:paddingTop="@{viewModel.insets.top}">
|
2019-10-02 17:42:38 +00:00
|
|
|
|
|
|
|
<com.google.android.material.appbar.MaterialToolbar
|
2019-10-03 15:31:45 +00:00
|
|
|
android:id="@+id/main_toolbar"
|
2019-10-02 17:42:38 +00:00
|
|
|
style="?styleToolbar"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
2019-10-05 20:20:57 +00:00
|
|
|
app:layout_scrollFlags="noScroll"
|
2019-10-22 16:08:57 +00:00
|
|
|
tools:layout_marginTop="24dp"
|
2019-10-03 16:41:04 +00:00
|
|
|
tools:title="Home" />
|
2019-10-02 17:42:38 +00:00
|
|
|
|
2019-10-22 16:08:57 +00:00
|
|
|
</com.google.android.material.appbar.AppBarLayout>
|
|
|
|
|
2019-10-10 15:34:06 +00:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-10-03 15:31:45 +00:00
|
|
|
android:id="@+id/main_bottom_bar"
|
2019-10-10 15:34:06 +00:00
|
|
|
style="?styleCardElevated"
|
2019-10-02 17:42:38 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_gravity="bottom"
|
2019-10-10 15:34:06 +00:00
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@{(int) @dimen/l1 + viewModel.insets.bottom}"
|
|
|
|
tools:layout_marginBottom="64dp">
|
2019-10-02 17:42:38 +00:00
|
|
|
|
2019-10-06 10:06:09 +00:00
|
|
|
<LinearLayout
|
2019-10-02 17:42:38 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2019-10-06 10:06:09 +00:00
|
|
|
android:animateLayoutChanges="true"
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
|
|
|
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" />
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
gone="@{viewModel.isConnected}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:gravity="center"
|
|
|
|
android:paddingBottom="@dimen/l_50"
|
|
|
|
android:text="@string/no_connection"
|
|
|
|
android:textAppearance="?appearanceTextCaptionNormal"
|
|
|
|
android:textColor="?colorError"
|
|
|
|
android:visibility="gone"
|
|
|
|
tools:visibility="visible" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
2019-10-02 17:42:38 +00:00
|
|
|
|
2019-10-10 15:34:06 +00:00
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2019-10-02 17:42:38 +00:00
|
|
|
|
|
|
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
|
|
|
|
|
|
</layout>
|