Added more information to magisk/manager cards

This commit is contained in:
Viktor De Pasquale 2019-10-26 17:33:27 +02:00
parent d0b817381e
commit a41597431c
4 changed files with 345 additions and 139 deletions

View File

@ -60,6 +60,9 @@ class HomeViewModel(
val stateMagiskProgress = KObservableField(0) val stateMagiskProgress = KObservableField(0)
val stateManagerProgress = KObservableField(0) val stateManagerProgress = KObservableField(0)
val stateMagiskExpanded = KObservableField(false)
val stateManagerExpanded = KObservableField(false)
val stateHideManagerName = R.string.manager.res().let { val stateHideManagerName = R.string.manager.res().let {
if (!statePackageOriginal) { if (!statePackageOriginal) {
it.replaceRandomWithSpecial(3) it.replaceRandomWithSpecial(3)
@ -137,6 +140,8 @@ class HomeViewModel(
.subscribeK { Navigation.install().publish() } .subscribeK { Navigation.install().publish() }
.add() .add()
fun toggle(kof: KObservableField<Boolean>) = kof.toggle()
private fun ensureEnv() { private fun ensureEnv() {
val invalidStates = listOf( val invalidStates = listOf(
MagiskState.NOT_INSTALLED, MagiskState.NOT_INSTALLED,

View File

@ -46,77 +46,171 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l1" android:layout_marginStart="@dimen/l1"
android:maxWidth="200dp" android:maxWidth="200dp"
android:onClick="@{() -> viewModel.toggle(viewModel.stateMagiskExpanded)}"
app:layout_constrainedWidth="true" app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper" app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:animateLayoutChanges="true" android:orientation="vertical">
android:background="@drawable/bg_card"
android:paddingStart="@dimen/l_50"
android:paddingTop="@dimen/l1"
android:paddingEnd="@dimen/l1"
android:paddingBottom="@dimen/l1"
app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/home_magisk_icon" android:layout_width="match_parent"
style="?styleIconPrimary" android:layout_height="wrap_content"
isEnabled="@{viewModel.stateMagisk != MagiskState.LOADING}" android:animateLayoutChanges="true"
onSelectClick="@{() -> viewModel.onDeletePressed()}" android:background="@drawable/bg_card"
onSelectReset="@{7000L}" android:paddingStart="@dimen/l_50"
android:padding="@dimen/l_25" android:paddingTop="@dimen/l1"
app:layout_constraintBottom_toBottomOf="parent" android:paddingEnd="@dimen/l1"
android:paddingBottom="@dimen/l1"
app:layout_constraintEnd_toStartOf="@+id/home_manager_wrapper"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent">
app:srcCompat="@drawable/ic_magisk_delete"
app:tint="@color/color_primary_error_transient" />
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/home_magisk_title" android:id="@+id/home_magisk_icon"
android:layout_width="0dp" style="?styleIconPrimary"
isEnabled="@{viewModel.stateMagisk != MagiskState.LOADING}"
onSelectClick="@{() -> viewModel.onDeletePressed()}"
onSelectReset="@{7000L}"
android:padding="@dimen/l_25"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_magisk_delete"
app:tint="@color/color_primary_error_transient" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l_50"
android:gravity="start|center_vertical"
android:text="@string/magisk"
android:textAppearance="?appearanceTextTitleNormal"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/home_magisk_status"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_icon"
app:layout_constraintTop_toTopOf="@+id/home_magisk_icon"
app:layout_constraintVertical_chainStyle="packed" />
<TextSwitcher
android:id="@+id/home_magisk_status"
gone="@{viewModel.stateTextMagisk.empty}"
textCaptionVariant="@{viewModel.stateTextMagisk}"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/home_magisk_version"
app:layout_constraintEnd_toEndOf="@+id/home_magisk_title"
app:layout_constraintStart_toStartOf="@+id/home_magisk_title"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_title" />
<TextSwitcher
android:id="@+id/home_magisk_version"
gone="@{viewModel.stateVersionUpdateMagisk.empty}"
textCaptionVariant="@{viewModel.stateVersionUpdateMagisk}"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_icon"
app:layout_constraintEnd_toEndOf="@+id/home_magisk_title"
app:layout_constraintStart_toStartOf="@+id/home_magisk_title"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_status" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
goneUnless="@{viewModel.stateMagiskExpanded}"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/l_50" android:clipToPadding="false"
android:gravity="start|center_vertical" android:paddingStart="@dimen/l1"
android:text="@string/magisk" android:paddingEnd="@dimen/l1"
android:textAppearance="?appearanceTextTitleNormal" android:paddingBottom="@dimen/l1"
app:layout_constrainedWidth="true" android:visibility="gone"
app:layout_constraintBottom_toTopOf="@+id/home_magisk_status" tools:visibility="visible">
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_icon"
app:layout_constraintTop_toTopOf="@+id/home_magisk_icon"
app:layout_constraintVertical_chainStyle="packed" />
<TextSwitcher <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_status" android:id="@+id/home_magisk_extra_version_title"
gone="@{viewModel.stateTextMagisk.empty}" style="@style/W.Home.Extra.Title"
textCaptionVariant="@{viewModel.stateTextMagisk}" android:layout_marginTop="@dimen/l1"
android:layout_width="0dp" android:text="@string/home_extra_version"
android:layout_height="wrap_content" app:layout_constraintStart_toStartOf="parent"
app:layout_constrainedWidth="true" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toTopOf="@+id/home_magisk_version"
app:layout_constraintEnd_toEndOf="@+id/home_magisk_title"
app:layout_constraintStart_toStartOf="@+id/home_magisk_title"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_title" />
<TextSwitcher <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_version" android:id="@+id/home_magisk_extra_version_value"
gone="@{viewModel.stateVersionUpdateMagisk.empty}" style="@style/W.Home.Extra.Value"
textCaptionVariant="@{viewModel.stateVersionUpdateMagisk}" android:text="@{Info.magiskVersionString}"
android:layout_width="0dp" app:layout_constraintBottom_toBottomOf="@+id/home_magisk_extra_version_title"
android:layout_height="wrap_content" app:layout_constraintEnd_toEndOf="parent"
app:layout_constrainedWidth="true" app:layout_constraintStart_toEndOf="@+id/home_magisk_extra_version_title"
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_icon" app:layout_constraintTop_toTopOf="@+id/home_magisk_extra_version_title"
app:layout_constraintEnd_toEndOf="@+id/home_magisk_title" tools:text="20.1" />
app:layout_constraintStart_toStartOf="@+id/home_magisk_title"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_status" />
</androidx.constraintlayout.widget.ConstraintLayout> <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_code_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_code"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_extra_version_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_code_value"
style="@style/W.Home.Extra.Value"
android:text="@{Integer.toString(Info.magiskVersionCode)}"
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_extra_code_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_extra_code_title"
app:layout_constraintTop_toTopOf="@+id/home_magisk_extra_code_title"
tools:text="12345" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_mode_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_mode"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_extra_code_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_mode_value"
style="@style/W.Home.Extra.Value"
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_extra_mode_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_extra_mode_title"
app:layout_constraintTop_toTopOf="@+id/home_magisk_extra_mode_title"
tools:text="Normal" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_connection_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_connection"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_magisk_extra_mode_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_magisk_extra_connection_value"
style="@style/W.Home.Extra.Value"
app:layout_constraintBottom_toBottomOf="@+id/home_magisk_extra_connection_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_extra_connection_title"
app:layout_constraintTop_toTopOf="@+id/home_magisk_extra_connection_title"
tools:text="Normal" />
<androidx.constraintlayout.widget.Group
gone="@{Info.magiskVersionCode &lt; 0}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="home_magisk_extra_version_title,home_magisk_extra_version_value,home_magisk_extra_code_title,home_magisk_extra_code_value" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<ProgressBar <ProgressBar
style="?styleProgressDeterminate" style="?styleProgressDeterminate"
@ -175,6 +269,7 @@
style="?styleCardVariant" style="?styleCardVariant"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:onClick="@{() -> viewModel.toggle(viewModel.stateManagerExpanded)}"
android:layout_marginStart="@dimen/l1" android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1" android:layout_marginEnd="@dimen/l1"
android:maxWidth="200dp" android:maxWidth="200dp"
@ -183,68 +278,163 @@
app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper" app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_card" android:orientation="vertical">
android:paddingStart="@dimen/l_50"
android:paddingTop="@dimen/l1"
android:paddingEnd="@dimen/l1"
android:paddingBottom="@dimen/l1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.AppCompatImageView <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/home_manager_icon" android:layout_width="match_parent"
style="?styleIconPrimary"
android:padding="@dimen/l_50"
app:layout_constraintBottom_toBottomOf="parent"
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_height="wrap_content"
android:layout_marginStart="@dimen/l_50" android:background="@drawable/bg_card"
android:gravity="start|center_vertical" android:paddingStart="@dimen/l_50"
android:text="@{viewModel.stateHideManagerName}" android:paddingTop="@dimen/l1"
android:textAppearance="?appearanceTextTitleNormal" android:paddingEnd="@dimen/l1"
app:layout_constrainedWidth="true" android:paddingBottom="@dimen/l1"
app:layout_constraintBottom_toTopOf="@+id/home_manager_status"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_icon" app:layout_constraintStart_toEndOf="@+id/home_magisk_wrapper"
app:layout_constraintTop_toTopOf="@+id/home_manager_icon" app:layout_constraintTop_toTopOf="parent">
app:layout_constraintVertical_chainStyle="packed"
tools:text="@string/manager" />
<TextSwitcher <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/home_manager_status" android:id="@+id/home_manager_icon"
gone="@{viewModel.stateTextManager.empty}" style="?styleIconPrimary"
textCaptionVariant="@{viewModel.stateTextManager}" android:background="@null"
android:layout_width="0dp" android:padding="@dimen/l_50"
app:layout_constraintBottom_toBottomOf="parent"
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/l_50"
android:gravity="start|center_vertical"
android:text="@{viewModel.stateHideManagerName}"
android:textAppearance="?appearanceTextTitleNormal"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/home_manager_status"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_icon"
app:layout_constraintTop_toTopOf="@+id/home_manager_icon"
app:layout_constraintVertical_chainStyle="packed"
tools:text="@string/manager" />
<TextSwitcher
android:id="@+id/home_manager_status"
gone="@{viewModel.stateTextManager.empty}"
textCaptionVariant="@{viewModel.stateTextManager}"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/home_manager_version"
app:layout_constraintEnd_toEndOf="@+id/home_manager_title"
app:layout_constraintStart_toStartOf="@+id/home_manager_title"
app:layout_constraintTop_toBottomOf="@+id/home_manager_title" />
<TextSwitcher
android:id="@+id/home_manager_version"
gone="@{viewModel.stateVersionUpdateManager.empty}"
textCaptionVariant="@{viewModel.stateVersionUpdateManager}"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="@+id/home_manager_icon"
app:layout_constraintEnd_toEndOf="@+id/home_manager_title"
app:layout_constraintStart_toStartOf="@+id/home_manager_title"
app:layout_constraintTop_toBottomOf="@+id/home_manager_status" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
goneUnless="@{viewModel.stateManagerExpanded}"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_constrainedWidth="true" android:clipToPadding="false"
app:layout_constraintBottom_toTopOf="@+id/home_manager_version" android:paddingStart="@dimen/l1"
app:layout_constraintEnd_toEndOf="@+id/home_manager_title" android:paddingEnd="@dimen/l1"
app:layout_constraintStart_toStartOf="@+id/home_manager_title" android:paddingBottom="@dimen/l1"
app:layout_constraintTop_toBottomOf="@+id/home_manager_title" /> android:visibility="gone"
tools:visibility="visible">
<TextSwitcher <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_version" android:id="@+id/home_manager_extra_version_title"
gone="@{viewModel.stateVersionUpdateManager.empty}" style="@style/W.Home.Extra.Title"
textCaptionVariant="@{viewModel.stateVersionUpdateManager}" android:layout_marginTop="@dimen/l1"
android:layout_width="0dp" android:text="@string/home_extra_version"
android:layout_height="wrap_content" app:layout_constraintStart_toStartOf="parent"
app:layout_constrainedWidth="true" app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintBottom_toBottomOf="@+id/home_manager_icon"
app:layout_constraintEnd_toEndOf="@+id/home_manager_title"
app:layout_constraintStart_toStartOf="@+id/home_manager_title"
app:layout_constraintTop_toBottomOf="@+id/home_manager_status" />
</androidx.constraintlayout.widget.ConstraintLayout> <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_version_value"
style="@style/W.Home.Extra.Value"
android:text="@{BuildConfig.VERSION_NAME}"
app:layout_constraintBottom_toBottomOf="@+id/home_manager_extra_version_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_extra_version_title"
app:layout_constraintTop_toTopOf="@+id/home_manager_extra_version_title"
tools:text="8.0.0" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_code_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_code"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_extra_version_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_code_value"
style="@style/W.Home.Extra.Value"
android:text="@{Integer.toString(BuildConfig.VERSION_CODE)}"
app:layout_constraintBottom_toBottomOf="@+id/home_manager_extra_code_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_extra_code_title"
app:layout_constraintTop_toTopOf="@+id/home_manager_extra_code_title"
tools:text="12345" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_mode_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_mode"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_extra_code_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_mode_value"
style="@style/W.Home.Extra.Value"
app:layout_constraintBottom_toBottomOf="@+id/home_manager_extra_mode_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_extra_mode_title"
app:layout_constraintTop_toTopOf="@+id/home_manager_extra_mode_title"
tools:text="@string/home_extra_mode_stub" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_package_title"
style="@style/W.Home.Extra.Title"
android:text="@string/home_extra_package"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_manager_extra_mode_title" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/home_manager_extra_package_value"
style="@style/W.Home.Extra.Value"
android:text="@{viewModel.statePackageManager}"
app:layout_constraintBottom_toBottomOf="@+id/home_manager_extra_package_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/home_manager_extra_package_title"
app:layout_constraintTop_toTopOf="@+id/home_manager_extra_package_title"
tools:text="com.soqspa.xmclaeixl" />
<androidx.constraintlayout.widget.Group
gone="@{viewModel.statePackageOriginal}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="home_manager_extra_package_title,home_manager_extra_package_value" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<ProgressBar <ProgressBar
style="?styleProgressDeterminate" style="?styleProgressDeterminate"
@ -304,41 +494,13 @@
items="@{viewModel.items}" items="@{viewModel.items}"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l2" android:layout_marginTop="@dimen/l1"
android:clipToPadding="false" android:clipToPadding="false"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingStart="@dimen/l1" android:paddingStart="@dimen/l1"
android:paddingEnd="@dimen/l1"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_developer" /> tools:listitem="@layout/item_developer" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/l2"
android:gravity="center"
android:text="@{String.format(`%s (%s)`, BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)}"
android:textAppearance="?appearanceTextCaptionVariant"
tools:text="7.3.4 (12345)" />
<androidx.appcompat.widget.AppCompatTextView
gone="@{Info.magiskVersionCode &lt; 0}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@{String.format(`%s (%s)`, Info.magiskVersionString, Info.magiskVersionCode)}"
android:textAppearance="?appearanceTextCaptionVariant"
tools:text="19.5 (12345)" />
<androidx.appcompat.widget.AppCompatTextView
gone="@{viewModel.statePackageOriginal}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@{viewModel.statePackageManager}"
android:textAppearance="?appearanceTextCaptionVariant"
tools:text="com.soqspa.xmclaeixl" />
</LinearLayout> </LinearLayout>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>

View File

@ -28,6 +28,16 @@
<string name="home_item_source">Source</string> <string name="home_item_source">Source</string>
<string name="home_item_xda">XDA</string> <string name="home_item_xda">XDA</string>
<string name="home_extra_version">Version</string>
<string name="home_extra_code">Code</string>
<string name="home_extra_mode">Mode</string>
<string name="home_extra_connection">Connection</string>
<string name="home_extra_package">Package</string>
<string name="home_extra_mode_normal">Normal</string>
<string name="home_extra_mode_safe">Safe</string>
<string name="home_extra_mode_stub">Dynamic</string>
<string name="safetyNet">SafetyNet</string> <string name="safetyNet">SafetyNet</string>
<!--ref. Magisk Hide--> <!--ref. Magisk Hide-->
<string name="magisk_hide_md2">Hide</string> <string name="magisk_hide_md2">Hide</string>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="W" parent="Widget" />
<style name="W.Home" />
<style name="W.Home.Extra" />
<style name="W.Home.Extra.Title">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">?appearanceTextCaptionVariant</item>
<item name="android:singleLine">true</item>
</style>
<style name="W.Home.Extra.Value">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textAppearance">?appearanceTextCaptionNormal</item>
<item name="android:textStyle">bold</item>
<item name="android:layout_marginStart">@dimen/l_50</item>
<item name="layout_constrainedWidth">true</item>
<item name="layout_constraintHorizontal_bias">0</item>
<item name="android:ellipsize">middle</item>
<item name="android:singleLine">true</item>
</style>
</resources>