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
784a7a7f
Commit
784a7a7f
authored
Nov 17, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back press closing filters in hide and module screens
parent
8e34baa5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
HideFragment.kt
...n/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
+12
-2
ModuleFragment.kt
...va/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
+9
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
View file @
784a7a7f
...
...
@@ -55,6 +55,18 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
lama
.
isAutoMeasureEnabled
=
false
}
override
fun
onPreBind
(
binding
:
FragmentHideMd2Binding
)
=
Unit
override
fun
onBackPressed
():
Boolean
{
if
(
binding
.
hideFilter
.
isVisible
)
{
binding
.
hideFilterInclude
.
hideFilterDone
.
performClick
()
return
true
}
return
super
.
onBackPressed
()
}
// ---
override
fun
onCreateOptionsMenu
(
menu
:
Menu
,
inflater
:
MenuInflater
)
{
inflater
.
inflate
(
R
.
menu
.
menu_hide_md2
,
menu
)
}
...
...
@@ -70,8 +82,6 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
return
super
.
onOptionsItemSelected
(
item
)
}
override
fun
onPreBind
(
binding
:
FragmentHideMd2Binding
)
=
Unit
}
object
MotionRevealHelper
{
...
...
app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
View file @
784a7a7f
...
...
@@ -7,6 +7,7 @@ import android.view.Menu
import
android.view.MenuInflater
import
android.view.MenuItem
import
android.view.View
import
androidx.core.view.isVisible
import
androidx.recyclerview.widget.StaggeredGridLayoutManager
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentModuleMd2Binding
...
...
@@ -64,6 +65,14 @@ class ModuleFragment : CompatFragment<ModuleViewModel, FragmentModuleMd2Binding>
super
.
onDestroyView
()
}
override
fun
onBackPressed
():
Boolean
{
if
(
binding
.
moduleFilter
.
isVisible
)
{
binding
.
moduleFilterInclude
.
moduleFilterDone
.
performClick
()
return
true
}
return
super
.
onBackPressed
()
}
// ---
override
fun
onCreateOptionsMenu
(
menu
:
Menu
,
inflater
:
MenuInflater
)
{
...
...
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