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
782adc9a
Commit
782adc9a
authored
Aug 30, 2020
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup some styles
parent
e0642b01
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3 additions
and
101 deletions
+3
-101
DataBindingAdapters.kt
...a/com/topjohnwu/magisk/databinding/DataBindingAdapters.kt
+0
-23
bg_selectable.xml
app/src/main/res/drawable-v21/bg_selectable.xml
+0
-10
bg_selectable_borderless.xml
app/src/main/res/drawable-v21/bg_selectable_borderless.xml
+0
-3
bg_selectable.xml
app/src/main/res/drawable/bg_selectable.xml
+0
-14
bg_selectable_borderless.xml
app/src/main/res/drawable/bg_selectable_borderless.xml
+0
-14
fragment_install_md2.xml
app/src/main/res/layout/fragment_install_md2.xml
+0
-7
styles_md2.xml
app/src/main/res/values/styles_md2.xml
+3
-14
styles_md2_impl.xml
app/src/main/res/values/styles_md2_impl.xml
+0
-16
No files found.
app/src/main/java/com/topjohnwu/magisk/databinding/DataBindingAdapters.kt
View file @
782adc9a
...
@@ -255,29 +255,6 @@ fun TextView.setStrikeThroughEnabled(useStrikeThrough: Boolean) {
...
@@ -255,29 +255,6 @@ fun TextView.setStrikeThroughEnabled(useStrikeThrough: Boolean) {
}
}
}
}
interface
OnPopupMenuItemClickListener
{
fun
onMenuItemClick
(
itemId
:
Int
)
}
@BindingAdapter
(
"popupMenu"
,
"popupMenuOnClickListener"
,
requireAll
=
false
)
fun
View
.
setPopupMenu
(
popupMenu
:
Int
,
listener
:
OnPopupMenuItemClickListener
)
{
val
menu
=
tag
as
?
PopupMenu
?:
let
{
val
themeWrapper
=
ContextThemeWrapper
(
context
,
R
.
style
.
Foundation_PopupMenu
)
PopupMenu
(
themeWrapper
,
this
)
}
tag
=
menu
.
apply
{
this
.
menu
.
clear
()
menuInflater
.
inflate
(
popupMenu
,
this
.
menu
)
setOnMenuItemClickListener
{
listener
.
onMenuItemClick
(
it
.
itemId
)
true
}
}
setOnClickListener
{
(
tag
as
PopupMenu
).
show
()
}
}
@BindingAdapter
(
"spanCount"
)
@BindingAdapter
(
"spanCount"
)
fun
RecyclerView
.
setSpanCount
(
count
:
Int
)
{
fun
RecyclerView
.
setSpanCount
(
count
:
Int
)
{
when
(
val
lama
=
layoutManager
)
{
when
(
val
lama
=
layoutManager
)
{
...
...
app/src/main/res/drawable-v21/bg_selectable.xml
deleted
100644 → 0
View file @
e0642b01
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:color=
"?colorPrimary"
>
<item
android:id=
"@android:id/mask"
>
<shape
android:shape=
"rectangle"
>
<corners
android:radius=
"@dimen/r1"
/>
<solid
android:color=
"?colorPrimary"
/>
</shape>
</item>
</ripple>
\ No newline at end of file
app/src/main/res/drawable-v21/bg_selectable_borderless.xml
deleted
100644 → 0
View file @
e0642b01
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:color=
"?colorPrimary"
/>
\ No newline at end of file
app/src/main/res/drawable/bg_selectable.xml
deleted
100644 → 0
View file @
e0642b01
<?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=
"@color/defColorPrimaryVariant"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
</selector>
app/src/main/res/drawable/bg_selectable_borderless.xml
deleted
100644 → 0
View file @
e0642b01
<?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=
"@color/defColorPrimaryVariant"
/>
</shape>
</item>
<item>
<shape
android:shape=
"rectangle"
>
<solid
android:color=
"@android:color/transparent"
/>
</shape>
</item>
</selector>
app/src/main/res/layout/fragment_install_md2.xml
View file @
782adc9a
...
@@ -95,7 +95,6 @@
...
@@ -95,7 +95,6 @@
<CheckBox
<CheckBox
gone=
"@{Info.isSAR}"
gone=
"@{Info.isSAR}"
style=
"@style/WidgetFoundation.Checkbox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:checked=
"@={Config.keepVerity}"
android:checked=
"@={Config.keepVerity}"
...
@@ -104,7 +103,6 @@
...
@@ -104,7 +103,6 @@
<CheckBox
<CheckBox
gone=
"@{Info.isFBE}"
gone=
"@{Info.isFBE}"
style=
"@style/WidgetFoundation.Checkbox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:checked=
"@={Config.keepEnc}"
android:checked=
"@={Config.keepEnc}"
...
@@ -113,7 +111,6 @@
...
@@ -113,7 +111,6 @@
<CheckBox
<CheckBox
gone=
"@{Info.ramdisk}"
gone=
"@{Info.ramdisk}"
style=
"@style/WidgetFoundation.Checkbox"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:checked=
"@={Config.recovery}"
android:checked=
"@={Config.recovery}"
...
@@ -188,7 +185,6 @@
...
@@ -188,7 +185,6 @@
<RadioButton
<RadioButton
android:id=
"@+id/method_download"
android:id=
"@+id/method_download"
style=
"@style/WidgetFoundation.RadioButton"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/download_zip_only"
android:text=
"@string/download_zip_only"
...
@@ -196,14 +192,12 @@
...
@@ -196,14 +192,12 @@
<RadioButton
<RadioButton
android:id=
"@+id/method_patch"
android:id=
"@+id/method_patch"
style=
"@style/WidgetFoundation.RadioButton"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/select_patch_file"
/>
android:text=
"@string/select_patch_file"
/>
<RadioButton
<RadioButton
android:id=
"@+id/method_direct"
android:id=
"@+id/method_direct"
style=
"@style/WidgetFoundation.RadioButton"
gone=
"@{!viewModel.rooted}"
gone=
"@{!viewModel.rooted}"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -211,7 +205,6 @@
...
@@ -211,7 +205,6 @@
<RadioButton
<RadioButton
android:id=
"@+id/method_inactive_slot"
android:id=
"@+id/method_inactive_slot"
style=
"@style/WidgetFoundation.RadioButton"
gone=
"@{!viewModel.isRooted || !Info.isAB}"
gone=
"@{!viewModel.isRooted || !Info.isAB}"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/values/styles_md2.xml
View file @
782adc9a
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<style
name=
"SplashTheme"
parent=
"SplashThemeBase"
/>
<style
name=
"SplashTheme"
parent=
"SplashThemeBase"
/>
<style
name=
"Foundation"
parent=
"Theme.MaterialComponents.
L
ight.NoActionBar"
>
<style
name=
"Foundation"
parent=
"Theme.MaterialComponents.
DayN
ight.NoActionBar"
>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
</style>
</style>
...
@@ -24,29 +24,18 @@
...
@@ -24,29 +24,18 @@
</style>
</style>
<!--endregion-->
<!--endregion-->
<style
name=
"Foundation.PopupMenu"
parent=
"Widget.AppCompat.PopupMenu"
>
<style
name=
"Foundation.PopupMenu"
parent=
"Widget.MaterialComponents.PopupMenu"
>
<item
name=
"android:textColor"
>
?colorOnSurface
</item>
<item
name=
"android:itemBackground"
>
?colorSurfaceVariant
</item>
<item
name=
"android:itemTextAppearance"
>
@style/AppearanceFoundation.Caption
</item>
<item
name=
"android:itemTextAppearance"
>
@style/AppearanceFoundation.Caption
</item>
<item
name=
"android:textStyle"
>
bold
</item>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
</style>
<style
name=
"Foundation.
Base
"
parent=
"Foundation.Compat"
>
<style
name=
"Foundation.
Default
"
parent=
"Foundation.Compat"
>
<item
name=
"android:fontFamily"
>
@font/exo
</item>
<item
name=
"android:fontFamily"
>
@font/exo
</item>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:includeFontPadding"
>
false
</item>
<!--///-->
<item
name=
"selectableItemBackground"
>
@drawable/bg_selectable
</item>
<item
name=
"selectableItemBackgroundBorderless"
>
@drawable/bg_selectable_borderless
</item>
<item
name=
"actionBarSize"
>
@dimen/internal_action_bar_size
</item>
<item
name=
"actionBarSize"
>
@dimen/internal_action_bar_size
</item>
<item
name=
"popupMenuStyle"
>
@style/Foundation.PopupMenu
</item>
<item
name=
"popupMenuStyle"
>
@style/Foundation.PopupMenu
</item>
</style>
</style>
<style
name=
"Foundation.Default"
parent=
"Foundation.Base"
>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
</style>
<style
name=
"Foundation.Floating"
parent=
"Empty"
>
<style
name=
"Foundation.Floating"
parent=
"Empty"
>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowIsFloating"
>
true
</item>
<item
name=
"android:windowIsTranslucent"
>
true
</item>
<item
name=
"android:windowIsTranslucent"
>
true
</item>
...
...
app/src/main/res/values/styles_md2_impl.xml
View file @
782adc9a
...
@@ -166,22 +166,6 @@
...
@@ -166,22 +166,6 @@
<item
name=
"tint"
>
@color/color_error_transient
</item>
<item
name=
"tint"
>
@color/color_error_transient
</item>
</style>
</style>
<style
name=
"WidgetFoundation.Checkbox"
parent=
"Widget.AppCompat.CompoundButton.CheckBox"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
<item
name=
"android:textAppearance"
>
@style/AppearanceFoundation.Body
</item>
<item
name=
"android:paddingStart"
>
@dimen/l1
</item>
<item
name=
"android:paddingEnd"
>
@dimen/l1
</item>
<item
name=
"tint"
>
?colorPrimary
</item>
</style>
<style
name=
"WidgetFoundation.RadioButton"
parent=
"Widget.AppCompat.CompoundButton.RadioButton"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
<item
name=
"android:textAppearance"
>
@style/AppearanceFoundation.Body
</item>
<item
name=
"android:paddingStart"
>
@dimen/l1
</item>
<item
name=
"android:paddingEnd"
>
@dimen/l1
</item>
<item
name=
"tint"
>
?colorPrimary
</item>
</style>
<style
name=
"WidgetFoundation.ProgressBar"
parent=
"Widget.AppCompat.ProgressBar.Horizontal"
>
<style
name=
"WidgetFoundation.ProgressBar"
parent=
"Widget.AppCompat.ProgressBar.Horizontal"
>
<item
name=
"android:indeterminate"
>
false
</item>
<item
name=
"android:indeterminate"
>
false
</item>
<item
name=
"android:layout_height"
>
4dp
</item>
<item
name=
"android:layout_height"
>
4dp
</item>
...
...
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