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
5c0e8638
Commit
5c0e8638
authored
Feb 28, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test button toggle in code
parent
64f5ff54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
HomeViewModel.kt
...c/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
+2
-0
fragment_home_md2.xml
app/src/main/res/layout/fragment_home_md2.xml
+1
-1
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/home/HomeViewModel.kt
View file @
5c0e8638
...
@@ -96,6 +96,8 @@ class HomeViewModel(
...
@@ -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 */
...
...
app/src/main/res/layout/fragment_home_md2.xml
View file @
5c0e8638
...
@@ -30,7 +30,7 @@
...
@@ -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()}"
...
...
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