mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-02-26 15:07:24 +00:00
254 lines
11 KiB
XML
254 lines
11 KiB
XML
<?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>
|
|
|
|
<import type="com.topjohnwu.magisk.core.Info" />
|
|
|
|
<import type="com.topjohnwu.magisk.ui.home.DeveloperItem" />
|
|
|
|
<import type="com.topjohnwu.magisk.ui.home.IconLink" />
|
|
|
|
<variable
|
|
name="viewModel"
|
|
type="com.topjohnwu.magisk.ui.home.HomeViewModel" />
|
|
|
|
</data>
|
|
|
|
<androidx.core.widget.NestedScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clipToPadding="false"
|
|
android:fillViewport="true"
|
|
android:paddingTop="@dimen/internal_action_bar_size"
|
|
android:paddingBottom="@dimen/l3"
|
|
app:fitsSystemWindowsInsets="top|bottom"
|
|
tools:layout_marginTop="24dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:clipToPadding="false"
|
|
android:orientation="vertical"
|
|
android:paddingTop="@dimen/l1">
|
|
|
|
<Button
|
|
style="@style/WidgetFoundation.Button"
|
|
gone="@{!viewModel.showTest}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:onClick="@{() -> viewModel.onTestPressed()}"
|
|
android:text="TEST"
|
|
android:textAllCaps="false"
|
|
tools:visibility="gone" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/WidgetFoundation.Card.Primary"
|
|
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"
|
|
android:focusable="false">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
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"
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.OnPrimary"
|
|
app:layout_constraintEnd_toStartOf="@+id/home_notice_hide"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<Button
|
|
android:id="@+id/home_notice_hide"
|
|
style="@style/WidgetFoundation.Button.Text.OnPrimary"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:onClick="@{() -> viewModel.hideNotice()}"
|
|
android:text="@string/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>
|
|
|
|
<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_marginStart="@dimen/l1"
|
|
android:layout_marginEnd="@dimen/l1"
|
|
app:layout_constraintTop_toBottomOf="@+id/home_device_wrapper" />
|
|
|
|
<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_marginStart="@dimen/l1"
|
|
android:layout_marginTop="@dimen/l1"
|
|
android:layout_marginEnd="@dimen/l1"
|
|
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
|
|
|
<Space
|
|
goneUnless="@{Info.env.isActive}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/l1" />
|
|
|
|
<Button
|
|
style="@style/WidgetFoundation.Button.Outlined.Error"
|
|
goneUnless="@{Info.env.isActive}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/l1"
|
|
android:layout_marginEnd="@dimen/l1"
|
|
android:onClick="@{() -> viewModel.onDeletePressed()}"
|
|
android:text="@string/uninstall_magisk_title"
|
|
android:textAllCaps="false"
|
|
android:textSize="12sp"
|
|
app:cornerRadius="@dimen/r1"
|
|
app:icon="@drawable/ic_delete_md2" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/WidgetFoundation.Card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:layout_marginStart="@dimen/l1"
|
|
android:layout_marginEnd="@dimen/l1"
|
|
android:layout_marginTop="@dimen/l1"
|
|
android:focusable="false">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingTop="@dimen/l1"
|
|
android:paddingBottom="@dimen/l1">
|
|
|
|
<TextView
|
|
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"
|
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
|
|
|
<TextView
|
|
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"
|
|
android:textAppearance="@style/AppearanceFoundation.Caption.Variant" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:paddingTop="@dimen/l_50" >
|
|
|
|
<include
|
|
item="@{IconLink.Patreon.INSTANCE}"
|
|
layout="@layout/item_icon_link"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1" />
|
|
|
|
<include
|
|
item="@{IconLink.PayPal.Project.INSTANCE}"
|
|
layout="@layout/item_icon_link"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1" />
|
|
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
style="@style/WidgetFoundation.Card"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:layout_margin="@dimen/l1"
|
|
android:focusable="false">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:paddingTop="@dimen/l1">
|
|
|
|
<TextView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/l1"
|
|
android:layout_marginEnd="@dimen/l1"
|
|
android:text="@string/home_follow_title"
|
|
android:textAppearance="@style/AppearanceFoundation.Title" />
|
|
|
|
<include
|
|
item="@{DeveloperItem.John.INSTANCE}"
|
|
layout="@layout/item_developer"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/l_50" />
|
|
|
|
<include
|
|
item="@{DeveloperItem.Vvb.INSTANCE}"
|
|
layout="@layout/item_developer"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/l_50" />
|
|
|
|
<include
|
|
item="@{DeveloperItem.YU.INSTANCE}"
|
|
layout="@layout/item_developer"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/l_50" />
|
|
|
|
<include
|
|
item="@{DeveloperItem.Rikka.INSTANCE}"
|
|
layout="@layout/item_developer"
|
|
viewModel="@{viewModel}"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/l_50" />
|
|
|
|
</LinearLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.core.widget.NestedScrollView>
|
|
|
|
</layout>
|