mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 16:07:39 +00:00
Add test button toggle in code
This commit is contained in:
parent
64f5ff5475
commit
5c0e86383c
@ -96,6 +96,8 @@ class HomeViewModel(
|
|||||||
ensureEnv()
|
ensureEnv()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val showTest = false
|
||||||
|
|
||||||
fun onTestPressed() = object : ViewEvent(), ActivityExecutor {
|
fun onTestPressed() = object : ViewEvent(), ActivityExecutor {
|
||||||
override fun invoke(activity: BaseActivity) {
|
override fun invoke(activity: BaseActivity) {
|
||||||
/* Entry point to trigger test events within the app */
|
/* Entry point to trigger test events within the app */
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
style="@style/WidgetFoundation.Button"
|
style="@style/WidgetFoundation.Button"
|
||||||
gone="@{true}"
|
gone="@{!viewModel.showTest}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:onClick="@{() -> viewModel.onTestPressed()}"
|
android:onClick="@{() -> viewModel.onTestPressed()}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user