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
0a239c2f
Commit
0a239c2f
authored
Nov 19, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added QOL improvements
- fast scroll in module/filter list - auto closing keyboard on scroll
parent
f5342a09
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
0 deletions
+54
-0
ModuleInstallDialog.kt
...pjohnwu/magisk/model/events/dialog/ModuleInstallDialog.kt
+2
-0
HideFragment.kt
...n/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
+6
-0
ModuleFragment.kt
...va/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
+7
-0
fast_scroll_thumb.xml
app/src/main/res/drawable/fast_scroll_thumb.xml
+19
-0
fast_scroll_track.xml
app/src/main/res/drawable/fast_scroll_track.xml
+15
-0
include_module_filter.xml
app/src/main/res/layout/include_module_filter.xml
+5
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/model/events/dialog/ModuleInstallDialog.kt
View file @
0a239c2f
...
...
@@ -22,10 +22,12 @@ class ModuleInstallDialog(private val item: Repo) : DialogEvent() {
.
cancellable
(
true
)
.
applyButton
(
MagiskDialog
.
ButtonType
.
POSITIVE
)
{
titleRes
=
R
.
string
.
install
icon
=
R
.
drawable
.
ic_install
onClick
{
download
(
true
)
}
}
.
applyButton
(
MagiskDialog
.
ButtonType
.
NEGATIVE
)
{
titleRes
=
R
.
string
.
download
icon
=
R
.
drawable
.
ic_download_md2
onClick
{
download
(
false
)
}
}
.
reveal
()
...
...
app/src/main/java/com/topjohnwu/magisk/redesign/hide/HideFragment.kt
View file @
0a239c2f
...
...
@@ -17,6 +17,7 @@ import androidx.core.view.marginBottom
import
androidx.core.view.marginEnd
import
androidx.interpolator.view.animation.FastOutSlowInInterpolator
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.google.android.material.circularreveal.CircularRevealCompat
import
com.google.android.material.circularreveal.CircularRevealWidget
import
com.google.android.material.floatingactionbutton.FloatingActionButton
...
...
@@ -50,6 +51,11 @@ class HideFragment : CompatFragment<HideViewModel, FragmentHideMd2Binding>() {
hideKeyboard
()
MotionRevealHelper
.
withViews
(
binding
.
hideFilter
,
binding
.
hideFilterToggle
,
false
)
}
binding
.
hideContent
.
addOnScrollListener
(
object
:
RecyclerView
.
OnScrollListener
()
{
override
fun
onScrollStateChanged
(
recyclerView
:
RecyclerView
,
newState
:
Int
)
{
if
(
newState
!=
RecyclerView
.
SCROLL_STATE_IDLE
)
hideKeyboard
()
}
})
val
lama
=
binding
.
hideContent
.
layoutManager
?:
return
lama
.
isAutoMeasureEnabled
=
false
...
...
app/src/main/java/com/topjohnwu/magisk/redesign/module/ModuleFragment.kt
View file @
0a239c2f
...
...
@@ -8,6 +8,7 @@ import android.view.MenuInflater
import
android.view.MenuItem
import
android.view.View
import
androidx.core.view.isVisible
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.StaggeredGridLayoutManager
import
com.topjohnwu.magisk.R
import
com.topjohnwu.magisk.databinding.FragmentModuleMd2Binding
...
...
@@ -55,6 +56,12 @@ class ModuleFragment : CompatFragment<ModuleViewModel, FragmentModuleMd2Binding>
hideKeyboard
()
MotionRevealHelper
.
withViews
(
binding
.
moduleFilter
,
binding
.
moduleFilterToggle
,
false
)
}
binding
.
moduleFilterInclude
.
moduleFilterList
.
addOnScrollListener
(
object
:
RecyclerView
.
OnScrollListener
()
{
override
fun
onScrollStateChanged
(
recyclerView
:
RecyclerView
,
newState
:
Int
)
{
if
(
newState
!=
RecyclerView
.
SCROLL_STATE_IDLE
)
hideKeyboard
()
}
})
}
override
fun
onDestroyView
()
{
...
...
app/src/main/res/drawable/fast_scroll_thumb.xml
0 → 100644
View file @
0a239c2f
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"?colorOnSurfaceVariant"
/>
<size
android:width=
"5dp"
android:height=
"5dp"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"?colorOnSurfaceVariant"
/>
<size
android:width=
"5dp"
android:height=
"5dp"
/>
</shape>
</item>
</selector>
app/src/main/res/drawable/fast_scroll_track.xml
0 → 100644
View file @
0a239c2f
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
</selector>
\ No newline at end of file
app/src/main/res/layout/include_module_filter.xml
View file @
0a239c2f
...
...
@@ -30,6 +30,11 @@
items=
"@{viewModel.itemsSearch}"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
app:fastScrollEnabled=
"true"
app:fastScrollHorizontalThumbDrawable=
"@drawable/fast_scroll_thumb"
app:fastScrollHorizontalTrackDrawable=
"@drawable/fast_scroll_track"
app:fastScrollVerticalThumbDrawable=
"@drawable/fast_scroll_thumb"
app:fastScrollVerticalTrackDrawable=
"@drawable/fast_scroll_track"
android:layout_marginBottom=
"@dimen/l1"
android:clipToPadding=
"false"
android:orientation=
"vertical"
...
...
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