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
433ae89e
Commit
433ae89e
authored
Jan 14, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make things run on API 17
parent
de853a26
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
130 additions
and
21 deletions
+130
-21
build.gradle
app/build.gradle
+3
-1
BaseUIActivity.kt
.../main/java/com/topjohnwu/magisk/ui/base/BaseUIActivity.kt
+1
-1
BaseUIFragment.kt
.../main/java/com/topjohnwu/magisk/ui/base/BaseUIFragment.kt
+1
-1
bg_appbar.xml
app/src/main/res/drawable-v21/bg_appbar.xml
+15
-0
bg_card.xml
app/src/main/res/drawable-v21/bg_card.xml
+8
-0
bg_divider_rounded_on_primary.xml
...c/main/res/drawable-v21/bg_divider_rounded_on_primary.xml
+7
-0
bg_shadow.xml
app/src/main/res/drawable-v21/bg_shadow.xml
+8
-0
fast_scroll_thumb.xml
app/src/main/res/drawable-v21/fast_scroll_thumb.xml
+19
-0
progress_determinate.xml
app/src/main/res/drawable-v21/progress_determinate.xml
+26
-0
bg_appbar.xml
app/src/main/res/drawable/bg_appbar.xml
+2
-2
bg_card.xml
app/src/main/res/drawable/bg_card.xml
+3
-3
bg_divider_rounded_on_primary.xml
app/src/main/res/drawable/bg_divider_rounded_on_primary.xml
+2
-2
bg_selectable.xml
app/src/main/res/drawable/bg_selectable.xml
+2
-2
bg_selectable_borderless.xml
app/src/main/res/drawable/bg_selectable_borderless.xml
+2
-2
bg_shadow.xml
app/src/main/res/drawable/bg_shadow.xml
+2
-2
fast_scroll_thumb.xml
app/src/main/res/drawable/fast_scroll_thumb.xml
+2
-2
progress_determinate.xml
app/src/main/res/drawable/progress_determinate.xml
+3
-3
default_color.xml
app/src/main/res/values/default_color.xml
+24
-0
No files found.
app/build.gradle
View file @
433ae89e
...
...
@@ -102,7 +102,9 @@ dependencies {
implementation
"com.squareup.retrofit2:adapter-rxjava2:${vRetrofit}"
def
vOkHttp
=
'3.12.7'
implementation
"com.squareup.okhttp3:okhttp:${vOkHttp}"
implementation
(
"com.squareup.okhttp3:okhttp:${vOkHttp}"
)
{
force
=
true
}
implementation
"com.squareup.okhttp3:logging-interceptor:${vOkHttp}"
def
vMoshi
=
'1.9.2'
...
...
app/src/main/java/com/topjohnwu/magisk/ui/base/BaseUIActivity.kt
View file @
433ae89e
...
...
@@ -15,7 +15,7 @@ abstract class BaseUIActivity<ViewModel : BaseViewModel, Binding : ViewDataBindi
protected
lateinit
var
binding
:
Binding
protected
abstract
val
layoutRes
:
Int
protected
abstract
val
viewModel
:
ViewModel
abstract
val
viewModel
:
ViewModel
protected
open
val
themeRes
:
Int
=
R
.
style
.
MagiskTheme
open
val
snackbarView
get
()
=
binding
.
root
...
...
app/src/main/java/com/topjohnwu/magisk/ui/base/BaseUIFragment.kt
View file @
433ae89e
...
...
@@ -17,7 +17,7 @@ abstract class BaseUIFragment<ViewModel : BaseViewModel, Binding : ViewDataBindi
protected
val
activity
get
()
=
requireActivity
()
as
BaseUIActivity
<*,
*>
protected
lateinit
var
binding
:
Binding
protected
abstract
val
layoutRes
:
Int
protected
abstract
val
viewModel
:
ViewModel
abstract
val
viewModel
:
ViewModel
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
app/src/main/res/drawable-v21/bg_appbar.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"?colorSurfaceVariant"
/>
</shape>
</item>
<item
android:bottom=
"2dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"?colorSurface"
/>
</shape>
</item>
</layer-list>
app/src/main/res/drawable-v21/bg_card.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"45"
android:endColor=
"?colorSurface"
android:startColor=
"?colorSurfaceVariant"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable-v21/bg_divider_rounded_on_primary.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<size
android:height=
"4dp"
/>
<corners
android:radius=
"2dp"
/>
<solid
android:color=
"?colorOnPrimary"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable-v21/bg_shadow.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"270"
android:endColor=
"?colorSurfaceVariant"
android:startColor=
"@android:color/transparent"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable-v21/fast_scroll_thumb.xml
0 → 100644
View file @
433ae89e
<?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-v21/progress_determinate.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:id=
"@android:id/background"
>
<shape>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
<item
android:id=
"@android:id/secondaryProgress"
>
<clip>
<shape>
<solid
android:color=
"?colorSecondary"
/>
</shape>
</clip>
</item>
<item
android:id=
"@android:id/progress"
>
<clip>
<shape>
<solid
android:color=
"?colorPrimary"
/>
</shape>
</clip>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/drawable/bg_appbar.xml
View file @
433ae89e
...
...
@@ -2,13 +2,13 @@
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"
?c
olorSurfaceVariant"
/>
<solid
android:color=
"
@color/defC
olorSurfaceVariant"
/>
</shape>
</item>
<item
android:bottom=
"2dp"
>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"
?c
olorSurface"
/>
<solid
android:color=
"
@color/defC
olorSurface"
/>
</shape>
</item>
...
...
app/src/main/res/drawable/bg_card.xml
View file @
433ae89e
...
...
@@ -3,6 +3,6 @@
android:shape=
"rectangle"
>
<gradient
android:angle=
"45"
android:endColor=
"
?c
olorSurface"
android:startColor=
"
?c
olorSurfaceVariant"
/>
android:endColor=
"
@color/defC
olorSurface"
android:startColor=
"
@color/defC
olorSurfaceVariant"
/>
</shape>
app/src/main/res/drawable/bg_divider_rounded_on_primary.xml
View file @
433ae89e
...
...
@@ -3,5 +3,5 @@
android:shape=
"rectangle"
>
<size
android:height=
"4dp"
/>
<corners
android:radius=
"2dp"
/>
<solid
android:color=
"
?c
olorOnPrimary"
/>
<solid
android:color=
"
@color/defC
olorOnPrimary"
/>
</shape>
app/src/main/res/drawable/bg_selectable.xml
View file @
433ae89e
...
...
@@ -3,7 +3,7 @@
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"
?c
olorPrimaryVariant"
/>
<solid
android:color=
"
@color/defC
olorPrimaryVariant"
/>
</shape>
</item>
<item>
...
...
app/src/main/res/drawable/bg_selectable_borderless.xml
View file @
433ae89e
...
...
@@ -3,7 +3,7 @@
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"
?c
olorPrimaryVariant"
/>
<solid
android:color=
"
@color/defC
olorPrimaryVariant"
/>
</shape>
</item>
<item>
...
...
app/src/main/res/drawable/bg_shadow.xml
View file @
433ae89e
...
...
@@ -3,6 +3,6 @@
android:shape=
"rectangle"
>
<gradient
android:angle=
"270"
android:endColor=
"
?c
olorSurfaceVariant"
android:endColor=
"
@color/defC
olorSurfaceVariant"
android:startColor=
"@android:color/transparent"
/>
</shape>
app/src/main/res/drawable/fast_scroll_thumb.xml
View file @
433ae89e
...
...
@@ -4,14 +4,14 @@
<item
android:state_pressed=
"true"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"
?c
olorOnSurfaceVariant"
/>
<solid
android:color=
"
@color/defC
olorOnSurfaceVariant"
/>
<size
android:width=
"5dp"
android:height=
"5dp"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"
?c
olorOnSurfaceVariant"
/>
<solid
android:color=
"
@color/defC
olorOnSurfaceVariant"
/>
<size
android:width=
"5dp"
android:height=
"5dp"
/>
</shape>
</item>
...
...
app/src/main/res/drawable/progress_determinate.xml
View file @
433ae89e
...
...
@@ -10,7 +10,7 @@
<item
android:id=
"@android:id/secondaryProgress"
>
<clip>
<shape>
<solid
android:color=
"
?c
olorSecondary"
/>
<solid
android:color=
"
@color/defC
olorSecondary"
/>
</shape>
</clip>
</item>
...
...
@@ -18,7 +18,7 @@
<item
android:id=
"@android:id/progress"
>
<clip>
<shape>
<solid
android:color=
"
?c
olorPrimary"
/>
<solid
android:color=
"
@color/defC
olorPrimary"
/>
</shape>
</clip>
</item>
...
...
app/src/main/res/values/default_color.xml
0 → 100644
View file @
433ae89e
<?xml version="1.0" encoding="utf-8"?>
<!--
Pre Android 5.0 does not support accessing colors from attributes in drawables
These values are from the default theme (Piplup light)
-->
<resources>
<color
name=
"defColorPrimary"
>
#4EAFF5
</color>
<color
name=
"defColorPrimaryVariant"
>
#804EAFF5
</color>
<color
name=
"defColorSecondary"
>
#3E78AF
</color>
<color
name=
"defColorSecondaryVariant"
>
#803E78AF
</color>
<color
name=
"defColorSurface"
>
#F9F9F9
</color>
<color
name=
"defColorSurfaceVariant"
>
#E8E8E8
</color>
<color
name=
"defColorSurfaceSurfaceVariant"
>
@color/defColorOnSurface
</color>
<color
name=
"defColorOnPrimary"
>
#F9F9F9
</color>
<color
name=
"defColorOnPrimaryVariant"
>
#D9E6E6E6
</color>
<color
name=
"defColorOnSecondary"
>
#F9F9F9
</color>
<color
name=
"defColorOnBackground"
>
@color/defColorOnSurface
</color>
<color
name=
"defColorError"
>
#CC0047
</color>
<color
name=
"defColorOnError"
>
#F9F9F9
</color>
<color
name=
"defColorOnSurface"
>
#444444
</color>
<color
name=
"defColorOnSurfaceVariant"
>
#80444444
</color>
<color
name=
"defColorDisabled"
>
#808080
</color>
<color
name=
"defColorDisabledVariant"
>
#66808080
</color>
</resources>
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