Update home screen layout (yet again)
This commit is contained in:
parent
e5ea3e4a43
commit
ffa85a616a
@ -40,7 +40,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/home_notice_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@ -73,6 +73,8 @@
|
||||
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_toTopOf="parent" />
|
||||
|
||||
<include
|
||||
@ -81,7 +83,9 @@
|
||||
viewModel="@{viewModel}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l_50"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_wrapper" />
|
||||
|
||||
<include
|
||||
@ -90,7 +94,9 @@
|
||||
viewModel="@{viewModel}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l_50"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:layout_marginEnd="@dimen/l1"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_wrapper" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
@ -106,7 +112,7 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/l1">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -114,7 +120,7 @@
|
||||
android:text="@string/home_support_title"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
@ -132,7 +138,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/l1"
|
||||
android:clipToPadding="false"
|
||||
android:nestedScrollingEnabled="@{false}"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="ifContentScrolls"
|
||||
android:paddingStart="@dimen/l1"
|
||||
|
@ -21,249 +21,242 @@
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_gravity="center">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_device_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:padding="@dimen/l_50"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_device" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_device_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@string/home_device_title"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_device_action_reboot"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_device_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/home_device_action_reboot"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
invisibleUnless="@{XSUKt.hasRoot}"
|
||||
popupMenu="@{R.menu.menu_reboot}"
|
||||
popupMenuOnClickListener="@{RebootEvent::reboot}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:text="@string/reboot"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_restart"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_device_title" />
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_device_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_device_action_reboot,home_device_title,home_device_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_title_barrier">
|
||||
android:paddingBottom="@dimen/l1"
|
||||
tools:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:id="@+id/home_device_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:padding="@dimen/l_50"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_device" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_device_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@string/home_device_title"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_device_action_reboot"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_device_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_device_icon" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/home_device_action_reboot"
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
invisibleUnless="@{XSUKt.hasRoot}"
|
||||
popupMenu="@{R.menu.menu_reboot}"
|
||||
popupMenuOnClickListener="@{RebootEvent::reboot}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
android:text="@string/reboot"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_restart"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_device_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_device_title" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_device_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_device_action_reboot,home_device_title,home_device_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_title_barrier">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_device_info_title"
|
||||
style="@style/W.Home.Title"
|
||||
android:text="@string/info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_title" />
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_manufacturer"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_title">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_manufacturer"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_manufacturer" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_manufacturer" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.MANUFACTURER}"
|
||||
tools:text="Google" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.MANUFACTURER}"
|
||||
tools:text="Google" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_product"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_manufacturer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_manufacturer">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_product"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_manufacturer"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_manufacturer">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_model" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_model" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.DEVICE ?? Build.PRODUCT}"
|
||||
tools:text="Pixel 4" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.DEVICE ?? Build.PRODUCT}"
|
||||
tools:text="Pixel 4" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_board"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_product"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_product">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_board"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_product"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_product">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_board" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_extra_board" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.BOARD}"
|
||||
tools:text="flame" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.BOARD}"
|
||||
tools:text="flame" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_version"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_board"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_board">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_info_version"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_info_board"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_info_board">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_system" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_device_system" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.VERSION.RELEASE}"
|
||||
tools:text="10" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Build.VERSION.RELEASE}"
|
||||
tools:text="10" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_device_details_title"
|
||||
style="@style/W.Home.Title"
|
||||
android:text="@string/details"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_title" />
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_ab"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_title">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_ab"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="A/B" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="A/B" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.isAB ? @string/yes : @string/no}"
|
||||
tools:text="Yes" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.isAB ? @string/yes : @string/no}"
|
||||
tools:text="Yes" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_sar"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_details_ab"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_ab">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_sar"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_details_ab"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_ab">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="SAR" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="SAR" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.isSAR ? @string/yes : @string/no}"
|
||||
tools:text="Yes" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.isSAR ? @string/yes : @string/no}"
|
||||
tools:text="Yes" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_recovery"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_details_sar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_sar">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_device_details_recovery"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="@+id/home_device_details_sar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_device_details_sar">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="Ramdisk" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="Ramdisk" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.ramdisk ? @string/yes : @string/no }"
|
||||
tools:text="Yes" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.ramdisk ? @string/yes : @string/no }"
|
||||
tools:text="Yes" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
</HorizontalScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</layout>
|
||||
|
@ -17,230 +17,192 @@
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_gravity="center">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_magisk_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:padding="@dimen/l_25"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_magisk" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_magisk_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@string/magisk"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_magisk_action"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_magisk_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_magisk_action"
|
||||
invisible="@{viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_magisk_title">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateMagisk != MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:onClick="@{() -> viewModel.onMagiskPressed()}"
|
||||
android:text="@string/update"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_update_md2" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateMagisk == MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:onClick="@{() -> viewModel.onMagiskPressed()}"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_install" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_magisk_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_magisk_action,home_magisk_title,home_magisk_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_title_barrier">
|
||||
android:paddingBottom="@dimen/l1"
|
||||
tools:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:id="@+id/home_magisk_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:padding="@dimen/l_25"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_magisk_outline" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_magisk_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@string/magisk"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_magisk_uninstall"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_magisk_icon"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_magisk_icon" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/home_magisk_uninstall"
|
||||
style="@style/WidgetFoundation.Icon.Error"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
gone="@{Info.env.magiskVersionCode < 0 || viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
||||
android:onClick="@{() -> viewModel.onDeletePressed()}"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_title"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_magisk_action"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_magisk_title"
|
||||
app:srcCompat="@drawable/ic_delete_md2" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_magisk_action"
|
||||
invisible="@{viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_magisk_title">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" >
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_magisk_info_title"
|
||||
style="@style/W.Home.Title"
|
||||
android:text="@string/info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/home_magisk_info_title" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_latest_version"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/home_magisk_info_title" >
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/module_section_remote" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.isConnected ? viewModel.stateMagiskRemoteVersion : @string/not_available}"
|
||||
tools:text="20.1 (12345)" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_installed_version"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_latest_version">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/installed" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.env.isActive ? viewModel.stateMagiskInstalledVersion : @string/not_available}"
|
||||
tools:text="20.1 (12345)" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_mode"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_installed_version">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/status" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.env.isActive ? viewModel.stateMagiskMode : @string/not_available}"
|
||||
tools:text="Normal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:max="100"
|
||||
android:progress="@{viewModel.stateMagiskProgress}" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card"
|
||||
gone="@{Info.env.magiskVersionCode < 0}"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateMagisk != MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:clickable="true"
|
||||
android:onClick="@{() -> viewModel.onDeletePressed()}">
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.onMagiskPressed()}"
|
||||
android:text="@string/update"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_update_md2" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateMagisk == MagiskState.OBSOLETE}"
|
||||
isEnabled="@{viewModel.stateManager == MagiskState.UP_TO_DATE && (viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100)}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.onMagiskPressed()}"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_install" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_delete" />
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_magisk_delete"
|
||||
style="@style/W.Home.Title"
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_magisk_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_magisk_action,home_magisk_title,home_magisk_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_title_barrier">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="wrap_content" >
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/uninstall"
|
||||
android:textColor="?colorError"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
style="@style/WidgetFoundation.Icon.Error"
|
||||
android:background="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_delete"
|
||||
app:srcCompat="@drawable/ic_delete_md2" />
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_latest_version"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" >
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/module_section_remote" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.isConnected ? viewModel.stateMagiskRemoteVersion : @string/not_available}"
|
||||
tools:text="20.1 (12345)" />
|
||||
|
||||
</HorizontalScrollView>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_installed_version"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_latest_version">
|
||||
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/installed" />
|
||||
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.env.isActive ? viewModel.stateMagiskInstalledVersion : @string/not_available}"
|
||||
tools:text="20.1 (12345)" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_magisk_mode"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_magisk_installed_version">
|
||||
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/status" />
|
||||
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{Info.env.isActive ? viewModel.stateMagiskMode : @string/not_available}"
|
||||
tools:text="Normal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ProgressBar
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateMagiskProgress == 0 || viewModel.stateMagiskProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:max="100"
|
||||
android:progress="@{viewModel.stateMagiskProgress}" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</layout>
|
||||
|
@ -17,225 +17,197 @@
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/WidgetFoundation.Card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
tools:layout_gravity="center">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/home_manager_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:padding="@dimen/l_50"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_manager" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_manager_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@{viewModel.stateHideManagerName}"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_manager_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_manager_action"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_manager_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/manager" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_manager_action"
|
||||
invisible="@{viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_manager_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_manager_title">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateManager != MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:onClick="@{() -> viewModel.onManagerPressed()}"
|
||||
android:text="@string/update"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_update_md2" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateManager == MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/l_50"
|
||||
android:onClick="@{() -> viewModel.onManagerPressed()}"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_install" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_manager_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_manager_action,home_manager_title,home_manager_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:paddingStart="@dimen/l1"
|
||||
android:paddingEnd="@dimen/l1"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_title_barrier">
|
||||
android:paddingBottom="@dimen/l1"
|
||||
tools:layout_gravity="center">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:id="@+id/home_manager_icon"
|
||||
style="@style/WidgetFoundation.Icon.Primary"
|
||||
android:padding="@dimen/l_50"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_manager" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/home_manager_title"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/l1"
|
||||
android:text="@{viewModel.stateHideManagerName}"
|
||||
android:textAppearance="@style/AppearanceFoundation.Title"
|
||||
android:textColor="?colorPrimary"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_manager_icon"
|
||||
app:layout_constraintEnd_toStartOf="@+id/home_manager_action"
|
||||
app:layout_constraintStart_toEndOf="@+id/home_manager_icon"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="@string/manager" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/home_manager_action"
|
||||
invisible="@{viewModel.stateMagisk == MagiskState.LOADING || !viewModel.isConnected}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
app:layout_constraintBottom_toBottomOf="@+id/home_manager_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/home_manager_title">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button"
|
||||
gone="@{viewModel.stateManager != MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.onManagerPressed()}"
|
||||
android:text="@string/update"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_update_md2" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<com.google.android.material.button.MaterialButton
|
||||
style="@style/WidgetFoundation.Button.Text"
|
||||
gone="@{viewModel.stateManager == MagiskState.OBSOLETE}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{() -> viewModel.onManagerPressed()}"
|
||||
android:text="@string/install"
|
||||
android:textAllCaps="false"
|
||||
app:icon="@drawable/ic_install" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/home_manager_title_barrier"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="home_manager_action,home_manager_title,home_manager_icon" />
|
||||
|
||||
<HorizontalScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fadingEdgeLength="@dimen/l1"
|
||||
android:paddingTop="@dimen/l_50"
|
||||
android:requiresFadingEdge="horizontal"
|
||||
android:scrollbars="none"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_title_barrier">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card.First"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_manager_info_title"
|
||||
style="@style/W.Home.Title"
|
||||
android:text="@string/info"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_info_title" />
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_latest_version"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_info_title">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_latest_version"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" >
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/module_section_remote" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/module_section_remote" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.isConnected ? viewModel.stateManagerRemoteVersion : @string/not_available}"
|
||||
tools:text="8.0.0 (123) (10)" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.isConnected ? viewModel.stateManagerRemoteVersion : @string/not_available}"
|
||||
tools:text="8.0.0 (123) (10)" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_installed_version"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_latest_version">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_installed_version"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_latest_version">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/installed" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/installed" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.stateManagerInstalledVersion}"
|
||||
tools:text="8.0.0 (123) (10)" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.stateManagerInstalledVersion}"
|
||||
tools:text="8.0.0 (123) (10)" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_internal_mode"
|
||||
style="@style/W.Home.Item"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_installed_version">
|
||||
|
||||
<ProgressBar
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateManagerProgress == 0 || viewModel.stateManagerProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:max="100"
|
||||
android:progress="@{viewModel.stateManagerProgress}" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/status" />
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{InfoKt.isRunningAsStub ? @string/home_status_stub : @string/home_status_normal}"
|
||||
tools:text="Normal" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="@style/W.Home.Card"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_internal_connection"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_internal_mode">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_manager_details_title"
|
||||
style="@style/W.Home.Title"
|
||||
android:text="@string/details"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<TextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_package" />
|
||||
|
||||
<View
|
||||
style="@style/W.Home.Section"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_details_title" />
|
||||
<TextView
|
||||
android:id="@+id/home_manager_extra_connection_value"
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.statePackageName}"
|
||||
tools:text="com.topjohnwu.magisk" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_internal_mode"
|
||||
style="@style/W.Home.Item.Top"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_details_title">
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/status" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{InfoKt.isRunningAsStub ? @string/home_status_stub : @string/home_status_normal}"
|
||||
tools:text="Normal" />
|
||||
<ProgressBar
|
||||
style="@style/WidgetFoundation.ProgressBar"
|
||||
gone="@{viewModel.stateManagerProgress == 0 || viewModel.stateManagerProgress == 100}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="bottom"
|
||||
android:max="100"
|
||||
android:progress="@{viewModel.stateManagerProgress}" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/home_manager_internal_connection"
|
||||
style="@style/W.Home.Item.Bottom"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/home_manager_internal_mode">
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/W.Home.ItemContent"
|
||||
android:text="@string/home_package" />
|
||||
</HorizontalScrollView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/home_manager_extra_connection_value"
|
||||
style="@style/W.Home.ItemContent.Right"
|
||||
android:text="@{viewModel.statePackageName}"
|
||||
tools:text="com.topjohnwu.magisk" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</HorizontalScrollView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</layout>
|
||||
|
Loading…
Reference in New Issue
Block a user