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
1ba9faf3
Commit
1ba9faf3
authored
Jan 30, 2020
by
Viktor De Pasquale
Committed by
John Wu
Jan 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added legacy theme (Fraxure)
Theme is, in color, identical to legacy colors.
parent
6e48294f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
155 additions
and
125 deletions
+155
-125
Theme.kt
app/src/main/java/com/topjohnwu/magisk/ui/theme/Theme.kt
+4
-0
fragment_theme_md2.xml
app/src/main/res/layout/fragment_theme_md2.xml
+116
-125
styles_view_md2.xml
app/src/main/res/values/styles_view_md2.xml
+28
-0
themes_md2.xml
app/src/main/res/values/themes_md2.xml
+7
-0
No files found.
app/src/main/java/com/topjohnwu/magisk/ui/theme/Theme.kt
View file @
1ba9faf3
...
@@ -35,6 +35,10 @@ enum class Theme(
...
@@ -35,6 +35,10 @@ enum class Theme(
Salamence
(
Salamence
(
themeName
=
"Salamence"
,
themeName
=
"Salamence"
,
themeRes
=
R
.
style
.
ThemeFoundationMD2_Salamence
themeRes
=
R
.
style
.
ThemeFoundationMD2_Salamence
),
Fraxure
(
themeName
=
"Fraxure (Legacy)"
,
themeRes
=
R
.
style
.
ThemeFoundationMD2_Fraxure
);
);
val
isSelected
get
()
=
Config
.
themeOrdinal
==
ordinal
val
isSelected
get
()
=
Config
.
themeOrdinal
==
ordinal
...
...
app/src/main/res/layout/fragment_theme_md2.xml
View file @
1ba9faf3
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
...
@@ -22,7 +21,7 @@
...
@@ -22,7 +21,7 @@
android:paddingEnd=
"@dimen/l1"
android:paddingEnd=
"@dimen/l1"
android:paddingBottom=
"@{viewModel.insets.bottom + (int) @dimen/l1}"
>
android:paddingBottom=
"@{viewModel.insets.bottom + (int) @dimen/l1}"
>
<
androidx.constraintlayout.widget.Constraint
Layout
<
Linear
Layout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:columnCount=
"2"
android:columnCount=
"2"
...
@@ -30,132 +29,124 @@
...
@@ -30,132 +29,124 @@
android:useDefaultMargins=
"true"
>
android:useDefaultMargins=
"true"
>
<include
<include
item=
"@{viewModel.themeHeadline}"
android:id=
"@+id/theme_card_dark"
android:id=
"@+id/theme_card_dark"
item=
"@{viewModel.themeHeadline}"
layout=
"@layout/item_tappable_headline"
layout=
"@layout/item_tappable_headline"
listener=
"@{viewModel}"
/>
listener=
"@{viewModel}"
/>
<FrameLayout
<LinearLayout
style=
"@style/W.Theme.Container"
>
android:id=
"@+id/theme_default"
android:layout_width=
"0dp"
<FrameLayout
android:layout_height=
"wrap_content"
android:id=
"@+id/theme_default"
android:layout_marginTop=
"@dimen/l1"
style=
"@style/W.Theme.Left"
android:layout_marginEnd=
"@dimen/l1"
android:theme=
"@style/ThemeFoundationMD2.Piplup"
>
android:theme=
"@style/ThemeFoundationMD2.Piplup"
app:layout_constraintEnd_toStartOf=
"@+id/theme_amoled"
<include
app:layout_constraintStart_toStartOf=
"parent"
layout=
"@layout/item_theme"
app:layout_constraintTop_toBottomOf=
"@+id/theme_card_dark"
>
theme=
"@{Theme.Piplup}"
viewModel=
"@{viewModel}"
/>
<include
layout=
"@layout/item_theme"
</FrameLayout>
theme=
"@{Theme.Piplup}"
viewModel=
"@{viewModel}"
/>
<FrameLayout
android:id=
"@+id/theme_amoled"
</FrameLayout>
style=
"@style/W.Theme.Right"
android:theme=
"@style/ThemeFoundationMD2.Amoled"
>
<FrameLayout
android:id=
"@+id/theme_amoled"
<include
android:layout_width=
"0dp"
layout=
"@layout/item_theme"
android:layout_height=
"wrap_content"
theme=
"@{Theme.PiplupAmoled}"
android:layout_marginTop=
"@dimen/l1"
viewModel=
"@{viewModel}"
/>
android:theme=
"@style/ThemeFoundationMD2.Amoled"
app:layout_constraintEnd_toEndOf=
"parent"
</FrameLayout>
app:layout_constraintStart_toEndOf=
"@+id/theme_default"
app:layout_constraintTop_toBottomOf=
"@+id/theme_card_dark"
>
</LinearLayout>
<include
<LinearLayout
style=
"@style/W.Theme.Container"
>
layout=
"@layout/item_theme"
theme=
"@{Theme.PiplupAmoled}"
<FrameLayout
viewModel=
"@{viewModel}"
/>
android:id=
"@+id/theme_rayquaza"
style=
"@style/W.Theme.Left"
</FrameLayout>
android:theme=
"@style/ThemeFoundationMD2.Rayquaza"
>
<FrameLayout
<include
android:id=
"@+id/theme_rayquaza"
layout=
"@layout/item_theme"
android:layout_width=
"0dp"
theme=
"@{Theme.Rayquaza}"
android:layout_height=
"wrap_content"
viewModel=
"@{viewModel}"
/>
android:layout_marginTop=
"@dimen/l1"
android:theme=
"@style/ThemeFoundationMD2.Rayquaza"
</FrameLayout>
app:layout_constraintEnd_toEndOf=
"@+id/theme_default"
app:layout_constraintStart_toStartOf=
"@+id/theme_default"
<FrameLayout
app:layout_constraintTop_toBottomOf=
"@+id/theme_default"
>
android:id=
"@+id/theme_zapdos"
style=
"@style/W.Theme.Right"
<include
android:theme=
"@style/ThemeFoundationMD2.Zapdos"
>
layout=
"@layout/item_theme"
theme=
"@{Theme.Rayquaza}"
<include
viewModel=
"@{viewModel}"
/>
layout=
"@layout/item_theme"
theme=
"@{Theme.Zapdos}"
</FrameLayout>
viewModel=
"@{viewModel}"
/>
<FrameLayout
</FrameLayout>
android:id=
"@+id/theme_zapdos"
android:layout_width=
"0dp"
</LinearLayout>
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/l1"
<LinearLayout
style=
"@style/W.Theme.Container"
>
android:theme=
"@style/ThemeFoundationMD2.Zapdos"
app:layout_constraintEnd_toEndOf=
"@+id/theme_amoled"
<FrameLayout
app:layout_constraintStart_toStartOf=
"@+id/theme_amoled"
android:id=
"@+id/theme_charmeleon"
app:layout_constraintTop_toBottomOf=
"@+id/theme_amoled"
>
style=
"@style/W.Theme.Left"
android:theme=
"@style/ThemeFoundationMD2.Charmeleon"
>
<include
layout=
"@layout/item_theme"
<include
theme=
"@{Theme.Zapdos}"
layout=
"@layout/item_theme"
viewModel=
"@{viewModel}"
/>
theme=
"@{Theme.Charmeleon}"
viewModel=
"@{viewModel}"
/>
</FrameLayout>
</FrameLayout>
<FrameLayout
android:id=
"@+id/theme_charmeleon"
<FrameLayout
android:layout_width=
"0dp"
android:id=
"@+id/theme_mew"
android:layout_height=
"wrap_content"
style=
"@style/W.Theme.Right"
android:layout_marginTop=
"@dimen/l1"
android:theme=
"@style/ThemeFoundationMD2.Mew"
>
android:theme=
"@style/ThemeFoundationMD2.Charmeleon"
app:layout_constraintEnd_toEndOf=
"@+id/theme_rayquaza"
<include
app:layout_constraintStart_toStartOf=
"@+id/theme_rayquaza"
layout=
"@layout/item_theme"
app:layout_constraintTop_toBottomOf=
"@+id/theme_rayquaza"
>
theme=
"@{Theme.Mew}"
viewModel=
"@{viewModel}"
/>
<include
layout=
"@layout/item_theme"
</FrameLayout>
theme=
"@{Theme.Charmeleon}"
viewModel=
"@{viewModel}"
/>
</LinearLayout>
</FrameLayout>
<LinearLayout
style=
"@style/W.Theme.Container"
>
<FrameLayout
<FrameLayout
android:id=
"@+id/theme_mew"
android:id=
"@+id/theme_salamence"
android:layout_width=
"0dp"
style=
"@style/W.Theme.Left"
android:layout_height=
"wrap_content"
android:theme=
"@style/ThemeFoundationMD2.Salamence"
>
android:layout_marginTop=
"@dimen/l1"
android:theme=
"@style/ThemeFoundationMD2.Mew"
<include
app:layout_constraintEnd_toEndOf=
"@+id/theme_zapdos"
layout=
"@layout/item_theme"
app:layout_constraintStart_toStartOf=
"@+id/theme_zapdos"
theme=
"@{Theme.Salamence}"
app:layout_constraintTop_toBottomOf=
"@+id/theme_zapdos"
>
viewModel=
"@{viewModel}"
/>
<include
</FrameLayout>
layout=
"@layout/item_theme"
theme=
"@{Theme.Mew}"
<FrameLayout
viewModel=
"@{viewModel}"
/>
android:id=
"@+id/theme_fraxure"
style=
"@style/W.Theme.Right"
</FrameLayout>
android:theme=
"@style/ThemeFoundationMD2.Fraxure"
>
<FrameLayout
<include
android:id=
"@+id/theme_salamence"
layout=
"@layout/item_theme"
android:layout_width=
"0dp"
theme=
"@{Theme.Fraxure}"
android:layout_height=
"wrap_content"
viewModel=
"@{viewModel}"
/>
android:layout_marginTop=
"@dimen/l1"
android:theme=
"@style/ThemeFoundationMD2.Salamence"
</FrameLayout>
app:layout_constraintEnd_toEndOf=
"@+id/theme_charmeleon"
app:layout_constraintStart_toStartOf=
"@+id/theme_charmeleon"
</LinearLayout>
app:layout_constraintTop_toBottomOf=
"@+id/theme_charmeleon"
>
</LinearLayout>
<include
layout=
"@layout/item_theme"
theme=
"@{Theme.Salamence}"
viewModel=
"@{viewModel}"
/>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>
</androidx.core.widget.NestedScrollView>
...
...
app/src/main/res/values/styles_view_md2.xml
View file @
1ba9faf3
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<style
name=
"W"
parent=
"android:Widget"
/>
<style
name=
"W"
parent=
"android:Widget"
/>
<!--region Home-->
<style
name=
"W.Home"
/>
<style
name=
"W.Home"
/>
<style
name=
"W.Home.Extra"
/>
<style
name=
"W.Home.Extra"
/>
...
@@ -26,4 +28,30 @@
...
@@ -26,4 +28,30 @@
<item
name=
"android:singleLine"
>
true
</item>
<item
name=
"android:singleLine"
>
true
</item>
</style>
</style>
<!--endregion-->
<!--region Themes-->
<style
name=
"W.Theme"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginTop"
>
@dimen/l1
</item>
<item
name=
"android:layout_weight"
>
1
</item>
</style>
<style
name=
"W.Theme.Left"
>
<item
name=
"android:layout_marginEnd"
>
@dimen/l1
</item>
</style>
<style
name=
"W.Theme.Right"
/>
<style
name=
"W.Theme.Container"
parent=
"Empty"
>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:orientation"
>
horizontal
</item>
<item
name=
"android:baselineAligned"
>
false
</item>
</style>
<!--endregion-->
</resources>
</resources>
\ No newline at end of file
app/src/main/res/values/themes_md2.xml
View file @
1ba9faf3
...
@@ -113,6 +113,13 @@
...
@@ -113,6 +113,13 @@
<item
name=
"colorOnPrimaryVariant"
>
#D9222222
</item>
<item
name=
"colorOnPrimaryVariant"
>
#D9222222
</item>
</style>
</style>
<style
name=
"ThemeFoundationMD2.Fraxure"
parent=
"ThemeFoundationMD2.Amoled"
>
<item
name=
"colorPrimary"
>
#009688
</item>
<item
name=
"colorPrimaryVariant"
>
#8000796B
</item>
<item
name=
"colorSecondary"
>
#D50000
</item>
<item
name=
"colorSecondaryVariant"
>
#806D1111
</item>
</style>
<!--3rd party themes-->
<!--3rd party themes-->
</resources>
</resources>
\ No newline at end of file
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