Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
64f35744
Commit
64f35744
authored
Feb 10, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reorganize home screen layout
parent
b5125281
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
293 deletions
+77
-293
HomeViewModel.kt
...c/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
+28
-31
include_home_magisk.xml
app/src/main/res/layout/include_home_magisk.xml
+31
-145
include_home_manager.xml
app/src/main/res/layout/include_home_manager.xml
+15
-116
strings.xml
app/src/main/res/values/strings.xml
+3
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
View file @
64f35744
...
...
@@ -40,19 +40,23 @@ class HomeViewModel(
val
stateMagisk
=
KObservableField
(
MagiskState
.
LOADING
)
val
stateManager
=
KObservableField
(
MagiskState
.
LOADING
)
val
stateVersionMagisk
=
KObservableField
(
""
)
val
stateCodeMagisk
=
KObservableField
(
0
)
val
stateVersionManager
=
KObservableField
(
""
)
val
stateCodeManager
=
KObservableField
(
0
)
val
stateCodeStub
=
KObservableField
(
0
)
val
statePackageManager
=
packageName
val
statePackageOriginal
=
statePackageManager
==
BuildConfig
.
APPLICATION_ID
val
stateMagiskRemoteVersion
=
KObservableField
(
R
.
string
.
home_loading
.
res
())
val
stateMagiskInstalledVersion
get
()
=
"${Info.env.magiskVersionString} (${Info.env.magiskVersionCode})"
val
stateMagiskMode
get
()
=
(
if
(
Config
.
coreOnly
)
R
.
string
.
home_extra_mode_safe
else
R
.
string
.
home_extra_mode_normal
).
res
()
val
stateMagiskProgress
=
KObservableField
(
0
)
val
stateManagerRemoteVersion
=
KObservableField
(
R
.
string
.
home_loading
.
res
())
val
stateManagerInstalledVersion
=
Info
.
stub
?.
let
{
"${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE}) (${it.version})"
}
?:
"${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
val
statePackageName
=
packageName
val
stateManagerProgress
=
KObservableField
(
0
)
val
stateHideManagerName
=
R
.
string
.
manager
.
res
().
let
{
if
(
!
statePackageOriginal
)
{
if
(
packageName
!=
BuildConfig
.
APPLICATION_ID
)
{
it
.
replaceRandomWithSpecial
(
3
)
}
else
{
it
...
...
@@ -80,28 +84,24 @@ class HomeViewModel(
}
override
fun
refresh
()
=
repoMagisk
.
fetchUpdate
()
.
onErrorReturn
{
Info
.
remote
}
.
subscribeK
{
updateBy
(
it
)
}
.
onErrorReturn
{
null
}
.
subscribeK
{
it
?.
updateUI
(
)
}
private
fun
updateBy
(
info
:
UpdateInfo
)
{
private
fun
UpdateInfo
.
updateUI
(
)
{
stateMagisk
.
value
=
when
{
!
info
.
magisk
.
isInstalled
->
MagiskState
.
NOT_INSTALLED
info
.
magisk
.
isObsolete
->
MagiskState
.
OBSOLETE
!
Info
.
env
.
isActive
->
MagiskState
.
NOT_INSTALLED
magisk
.
isObsolete
->
MagiskState
.
OBSOLETE
else
->
MagiskState
.
UP_TO_DATE
}
stateManager
.
value
=
when
{
!
info
.
app
.
isUpdateChannelCorrect
&&
isConnected
.
value
->
MagiskState
.
NOT_INSTALLED
info
.
app
.
isObsolete
->
MagiskState
.
OBSOLETE
!
app
.
isUpdateChannelCorrect
&&
isConnected
.
value
->
MagiskState
.
NOT_INSTALLED
app
.
isObsolete
->
MagiskState
.
OBSOLETE
else
->
MagiskState
.
UP_TO_DATE
}
stateVersionMagisk
.
value
=
info
.
magisk
.
version
stateVersionManager
.
value
=
info
.
app
.
version
stateCodeMagisk
.
value
=
info
.
magisk
.
versionCode
stateCodeManager
.
value
=
info
.
app
.
versionCode
stateCodeStub
.
value
=
info
.
stub
.
versionCode
stateMagiskRemoteVersion
.
value
=
"${magisk.version} (${magisk.versionCode})"
stateManagerRemoteVersion
.
value
=
"${app.version} (${app.versionCode}) (${stub.versionCode})"
ensureEnv
()
}
...
...
@@ -153,14 +153,11 @@ class HomeViewModel(
}
}
}
@Suppress
(
"unused"
)
val
MagiskJson
.
isInstalled
get
()
=
Info
.
env
.
magiskVersionCode
>
0
val
MagiskJson
.
isObsolete
get
()
=
Info
.
env
.
magiskVersionCode
<
versionCode
&&
isInstalled
val
ManagerJson
.
isUpdateChannelCorrect
private
val
MagiskJson
.
isObsolete
get
()
=
Info
.
env
.
isActive
&&
Info
.
env
.
magiskVersionCode
<
versionCode
val
ManagerJson
.
isUpdateChannelCorrect
get
()
=
versionCode
>
0
val
ManagerJson
.
isObsolete
val
ManagerJson
.
isObsolete
get
()
=
BuildConfig
.
VERSION_CODE
<
versionCode
}
app/src/main/res/layout/include_home_magisk.xml
View file @
64f35744
...
...
@@ -9,8 +9,6 @@
<import
type=
"com.topjohnwu.magisk.core.InfoKt"
/>
<import
type=
"com.topjohnwu.magisk.core.Config"
/>
<import
type=
"com.topjohnwu.magisk.ui.home.MagiskState"
/>
<variable
...
...
@@ -108,17 +106,16 @@
<com.google.android.material.card.MaterialCardView
style=
"@style/W.Home.Card.First"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:alpha=
"@{viewModel.stateCodeMagisk < 0 ? .5f : 1f}"
>
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_
remote
_title"
android:id=
"@+id/home_magisk_
info
_title"
style=
"@style/W.Home.Title"
android:text=
"@string/
module_section_remot
e"
android:text=
"@string/
home_device_info_titl
e"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -127,147 +124,47 @@
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@
+id/home_magisk_remote
_title"
/>
app:layout_constraintTop_toBottomOf=
"@
id/home_magisk_info
_title"
/>
<LinearLayout
android:id=
"@+id/home_magisk_
remote
_version"
android:id=
"@+id/home_magisk_
latest
_version"
style=
"@style/W.Home.Item.Top"
invisible=
"@{viewModel.stateCodeMagisk < 0}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@
+id/home_magisk_remote_title"
>
app:layout_constraintTop_toBottomOf=
"@
id/home_magisk_info_title"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/
home_extra_version
"
/>
android:text=
"@string/
module_section_remote
"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{viewModel.
stateVersionMagisk
}"
tools:text=
"20.1"
/>
android:text=
"@{viewModel.
isConnected ? viewModel.stateMagiskRemoteVersion : @string/home_extra_stub_na
}"
tools:text=
"20.1
(12345)
"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_magisk_remote_version_code"
style=
"@style/W.Home.Item.Bottom"
invisible=
"@{viewModel.stateCodeMagisk < 0}"
android:id=
"@+id/home_magisk_installed_version"
style=
"@style/W.Home.Item"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_
remote
_version"
>
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_
latest
_version"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/
home_extra_code
"
/>
android:text=
"@string/
installed
"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{In
teger.toString(viewModel.stateCodeMagisk)
}"
tools:text=
"
12345
"
/>
android:text=
"@{In
fo.env.isActive ? viewModel.stateMagiskInstalledVersion : @string/home_extra_stub_na
}"
tools:text=
"
20.1 (12345)
"
/>
</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}"
android:layout_width=
"wrap_content"
android:layout_height=
"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_internal_title"
style=
"@style/W.Home.Title"
android:text=
"@string/installed"
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_internal_title"
/>
<LinearLayout
android:id=
"@+id/home_magisk_internal_version"
style=
"@style/W.Home.Item.Top"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_internal_title"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_version"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Info.env.magiskVersionString}"
tools:text=
"20.1"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_magisk_internal_version_code"
android:id=
"@+id/home_magisk_mode"
style=
"@style/W.Home.Item.Bottom"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_internal_version"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_code"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Integer.toString(Info.env.magiskVersionCode)}"
tools:text=
"12345"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style=
"@style/W.Home.Card"
gone=
"@{Info.env.magiskVersionCode < 0}"
android:layout_width=
"wrap_content"
android:layout_height=
"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_details_title"
style=
"@style/W.Home.Title"
android:text=
"@string/home_details_title"
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_details_title"
/>
<LinearLayout
android:id=
"@+id/home_magisk_internal_mode"
style=
"@style/W.Home.Item.Top"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_details_title"
>
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_installed_version"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
...
...
@@ -275,50 +172,39 @@
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Config.coreOnly ? @string/home_extra_mode_safe : @string/home_extra_mode_normal}"
tools:text=
"Normal"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_magisk_internal_connection"
style=
"@style/W.Home.Item.Bottom"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_magisk_internal_mode"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_connection"
/>
<!--todo(topjohnwu) fix connection type-->
<!--don't forget to bind verbose values to proper resources-->
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/home_magisk_extra_connection_value"
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Info.env.isActive ? viewModel.stateMagiskMode : @string/home_extra_stub_na}"
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}"
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
android:clickable=
"true"
android:onClick=
"@{() -> viewModel.onDeletePressed()}"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"wrap_content"
android:layout_height=
"
wrap_cont
ent"
android:layout_height=
"
match_par
ent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<View
android:id=
"@+id/view"
style=
"@style/W.Home.Section"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -340,8 +226,8 @@
<androidx.appcompat.widget.AppCompatImageView
style=
"@style/WidgetFoundation.Icon.Error"
android:layout_marginTop=
"@dimen/l_50"
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/src/main/res/layout/include_home_manager.xml
View file @
64f35744
...
...
@@ -7,8 +7,6 @@
<import
type=
"com.topjohnwu.magisk.core.Info"
/>
<import
type=
"com.topjohnwu.magisk.BuildConfig"
/>
<import
type=
"com.topjohnwu.magisk.core.InfoKt"
/>
<import
type=
"com.topjohnwu.magisk.ui.home.MagiskState"
/>
...
...
@@ -106,7 +104,6 @@
<com.google.android.material.card.MaterialCardView
style=
"@style/W.Home.Card.First"
android:layout_width=
"wrap_content"
android:alpha=
"@{viewModel.stateCodeManager < 0 ? .5f : 1f}"
android:layout_height=
"wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
...
...
@@ -114,9 +111,9 @@
android:layout_height=
"wrap_content"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/home_manager_
remote
_title"
android:id=
"@+id/home_manager_
info
_title"
style=
"@style/W.Home.Title"
android:text=
"@string/
module_section_remot
e"
android:text=
"@string/
home_device_info_titl
e"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -125,59 +122,39 @@
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
remote
_title"
/>
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
info
_title"
/>
<LinearLayout
android:id=
"@+id/home_manager_
remote
_version"
android:id=
"@+id/home_manager_
latest
_version"
style=
"@style/W.Home.Item.Top"
invisible=
"@{viewModel.stateCodeManager < 0}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_remote_title"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_version"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{viewModel.stateVersionManager}"
tools:text=
"20.1"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_manager_remote_version_code"
style=
"@style/W.Home.Item"
invisible=
"@{viewModel.stateCodeManager < 0}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
remote_version
"
>
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
info_title
"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/
home_extra_cod
e"
/>
android:text=
"@string/
module_section_remot
e"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{
Integer.toString(viewModel.stateCodeManager)
}"
tools:text=
"
12345
"
/>
android:text=
"@{
viewModel.isConnected ? viewModel.stateManagerRemoteVersion : @string/home_extra_stub_na
}"
tools:text=
"
8.0.0 (123) (10)
"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_manager_
remote_stub_version_code
"
android:id=
"@+id/home_manager_
installed_version
"
style=
"@style/W.Home.Item.Bottom"
invisible=
"@{viewModel.stateCodeManager < 0}"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
remote_version_code
"
>
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_
latest_version
"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/
home_extra_stub
"
/>
android:text=
"@string/
installed
"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{
Integer.toString(viewModel.stateCodeStub)
}"
tools:text=
"
5
"
/>
android:text=
"@{
viewModel.stateManagerInstalledVersion
}"
tools:text=
"
8.0.0 (123) (10)
"
/>
</LinearLayout>
...
...
@@ -198,84 +175,6 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/home_manager_internal_title"
style=
"@style/W.Home.Title"
android:text=
"@string/installed"
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_manager_internal_title"
/>
<LinearLayout
android:id=
"@+id/home_manager_internal_version"
style=
"@style/W.Home.Item.Top"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_internal_title"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_version"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{BuildConfig.VERSION_NAME}"
tools:text=
"20.1"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_manager_internal_version_code"
style=
"@style/W.Home.Item"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_internal_version"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_code"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Integer.toString(BuildConfig.VERSION_CODE)}"
tools:text=
"12345"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/home_manager_internal_stub_version_code"
style=
"@style/W.Home.Item.Bottom"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/home_manager_internal_version_code"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent"
android:text=
"@string/home_extra_stub"
/>
<androidx.appcompat.widget.AppCompatTextView
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{Info.stub != null ? Integer.toString(Info.stub.version) : @string/home_extra_stub_na}"
tools:text=
"5"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
<com.google.android.material.card.MaterialCardView
style=
"@style/W.Home.Card"
gone=
"@{Info.env.magiskVersionCode < 0}"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
...
...
@@ -324,7 +223,7 @@
<androidx.appcompat.widget.AppCompatTextView
android:id=
"@+id/home_manager_extra_connection_value"
style=
"@style/W.Home.ItemContent.Right"
android:text=
"@{viewModel.statePackage
Manager
}"
android:text=
"@{viewModel.statePackage
Name
}"
tools:text=
"com.topjohnwu.magisk"
/>
</LinearLayout>
...
...
app/src/main/res/values/strings.xml
View file @
64f35744
...
...
@@ -28,7 +28,9 @@
<string
name=
"home_item_source"
>
Source
</string>
<string
name=
"home_support_content"
>
Magisk is, and always will be, free and open-source. You can however show us that you care by sending a small donation.
</string>
<string
name=
"home_device_title"
>
Your device
</string>
<string
name=
"home_loading"
>
Loading…
</string>
<string
name=
"home_device_title"
>
Device
</string>
<string
name=
"home_device_info_title"
>
Info
</string>
<string
name=
"home_device_extra_manufacturer"
>
Manufacturer
</string>
<string
name=
"home_device_extra_model"
>
Model
</string>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment