2019-10-03 15:31:45 +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"
|
2020-01-12 16:43:09 +00:00
|
|
|
type="com.topjohnwu.magisk.ui.home.HomeViewModel" />
|
2019-10-03 15:31:45 +00:00
|
|
|
|
|
|
|
</data>
|
|
|
|
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
android:clipToPadding="false"
|
2019-11-25 16:25:49 +00:00
|
|
|
android:fillViewport="true"
|
2019-10-22 16:08:57 +00:00
|
|
|
android:paddingTop="@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
|
2020-02-01 12:56:56 +00:00
|
|
|
android:paddingBottom="@{viewModel.insets.bottom + (int) @dimen/l3}"
|
2019-10-03 15:31:45 +00:00
|
|
|
tools:layout_marginTop="24dp">
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
2019-11-25 16:25:49 +00:00
|
|
|
android:layout_height="match_parent"
|
2019-10-08 16:51:31 +00:00
|
|
|
android:clipToPadding="false"
|
2019-10-26 18:59:30 +00:00
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l1">
|
2019-10-03 15:31:45 +00:00
|
|
|
|
2019-11-01 18:02:30 +00:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-11-25 16:54:04 +00:00
|
|
|
style="@style/WidgetFoundation.Card.Primary"
|
2019-11-01 18:02:30 +00:00
|
|
|
goneUnless="@{viewModel.noticeVisible}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:layout_marginBottom="@dimen/l1">
|
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:id="@+id/home_notice_content"
|
|
|
|
android:layout_width="0dp"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:padding="@dimen/l1"
|
|
|
|
android:text="@string/home_notice_content"
|
2019-11-22 18:29:53 +00:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.OnPrimary"
|
2019-11-01 18:02:30 +00:00
|
|
|
app:layout_constraintEnd_toStartOf="@+id/home_notice_hide"
|
|
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
<com.google.android.material.button.MaterialButton
|
|
|
|
android:id="@+id/home_notice_hide"
|
2019-11-22 18:29:53 +00:00
|
|
|
style="@style/WidgetFoundation.Button.Text.OnPrimary"
|
2019-11-01 18:02:30 +00:00
|
|
|
android:layout_width="wrap_content"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:onClick="@{() -> viewModel.hideNotice()}"
|
|
|
|
android:text="@string/home_notice_hide"
|
|
|
|
android:textAllCaps="false"
|
|
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
2020-01-31 18:37:45 +00:00
|
|
|
<include
|
|
|
|
android:id="@+id/home_device_wrapper"
|
|
|
|
layout="@layout/include_home_device"
|
|
|
|
viewModel="@{viewModel}"
|
2019-10-03 15:31:45 +00:00
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
2020-01-31 18:37:45 +00:00
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
2019-10-26 18:59:30 +00:00
|
|
|
|
2020-01-31 18:37:45 +00:00
|
|
|
<include
|
|
|
|
android:id="@+id/home_magisk_wrapper"
|
|
|
|
layout="@layout/include_home_magisk"
|
|
|
|
viewModel="@{viewModel}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l_50"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/home_device_wrapper" />
|
2019-10-26 13:14:20 +00:00
|
|
|
|
2020-01-31 18:37:45 +00:00
|
|
|
<include
|
|
|
|
android:id="@+id/home_manager_wrapper"
|
|
|
|
layout="@layout/include_home_manager"
|
|
|
|
viewModel="@{viewModel}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l_50"
|
|
|
|
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
2019-10-03 15:31:45 +00:00
|
|
|
|
2019-11-25 16:25:49 +00:00
|
|
|
<com.google.android.material.card.MaterialCardView
|
2019-12-02 17:39:22 +00:00
|
|
|
style="@style/WidgetFoundation.Card"
|
2019-10-03 15:31:45 +00:00
|
|
|
android:layout_width="match_parent"
|
2019-10-07 18:09:12 +00:00
|
|
|
android:layout_height="wrap_content"
|
2019-11-25 16:25:49 +00:00
|
|
|
android:layout_gravity="bottom"
|
|
|
|
android:layout_margin="@dimen/l1">
|
2019-10-26 19:14:01 +00:00
|
|
|
|
2019-11-25 16:25:49 +00:00
|
|
|
<LinearLayout
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:orientation="vertical"
|
|
|
|
android:paddingTop="@dimen/l1">
|
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:text="@string/home_support_title"
|
2019-12-02 17:39:22 +00:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
2019-11-25 16:25:49 +00:00
|
|
|
|
|
|
|
<androidx.appcompat.widget.AppCompatTextView
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginStart="@dimen/l1"
|
|
|
|
android:layout_marginTop="@dimen/l_50"
|
|
|
|
android:layout_marginEnd="@dimen/l1"
|
|
|
|
android:text="@string/home_support_content"
|
2019-12-02 17:39:22 +00:00
|
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
2019-11-25 16:25:49 +00:00
|
|
|
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
2020-01-22 18:23:42 +00:00
|
|
|
dividerHorizontal="@{@drawable/divider_l1}"
|
|
|
|
dividerVertical="@{@drawable/divider_l1}"
|
2019-11-25 16:25:49 +00:00
|
|
|
itemBinding="@{viewModel.itemDeveloperBinding}"
|
|
|
|
items="@{viewModel.items}"
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
android:layout_marginTop="@dimen/l1"
|
|
|
|
android:clipToPadding="false"
|
|
|
|
android:nestedScrollingEnabled="@{false}"
|
|
|
|
android:orientation="horizontal"
|
|
|
|
android:overScrollMode="ifContentScrolls"
|
|
|
|
android:paddingStart="@dimen/l1"
|
|
|
|
app:layoutManager="androidx.recyclerview.widget.StaggeredGridLayoutManager"
|
|
|
|
app:spanCount="2"
|
|
|
|
tools:itemCount="3"
|
|
|
|
tools:listitem="@layout/item_developer" />
|
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
2019-10-03 15:31:45 +00:00
|
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
|
2020-01-12 08:07:30 +00:00
|
|
|
</layout>
|