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
a5830599
Commit
a5830599
authored
Sep 24, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added initial load of styles and attributes
Required for creating basic screens
parent
cba0d040
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
672 additions
and
2 deletions
+672
-2
color_menu_tint.xml
app/src/main/res/color/color_menu_tint.xml
+5
-0
bg_accent.xml
app/src/main/res/drawable/bg_accent.xml
+12
-0
bg_circle.xml
app/src/main/res/drawable/bg_circle.xml
+14
-0
bg_divider_top.xml
app/src/main/res/drawable/bg_divider_top.xml
+21
-0
test.xml
app/src/main/res/layout/test.xml
+253
-0
menu_bottom_nav.xml
app/src/main/res/menu/menu_bottom_nav.xml
+29
-0
menu_invisible.xml
app/src/main/res/menu/menu_invisible.xml
+8
-0
styles_md2.xml
app/src/main/res/values-v19/styles_md2.xml
+9
-0
attrs.xml
app/src/main/res/values/attrs.xml
+70
-2
styles_md2.xml
app/src/main/res/values/styles_md2.xml
+89
-0
styles_md2_appearance.xml
app/src/main/res/values/styles_md2_appearance.xml
+101
-0
styles_md2_impl.xml
app/src/main/res/values/styles_md2_impl.xml
+61
-0
No files found.
app/src/main/res/color/color_menu_tint.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"?colorSecondary"
android:state_checked=
"true"
/>
<item
android:color=
"?colorOnSurfaceVariant"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_accent.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<corners
android:radius=
"2.5dp"
/>
<gradient
android:angle=
"135"
android:endColor=
"?colorSecondary"
android:startColor=
"?colorPrimary"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_circle.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:left=
"-300dp"
android:right=
"-300dp"
android:top=
"-300dp"
>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"oval"
>
<gradient
android:endColor=
"?colorSecondary"
android:startColor=
"?colorPrimary"
/>
</shape>
</item>
</layer-list>
app/src/main/res/drawable/bg_divider_top.xml
0 → 100644
View file @
a5830599
<?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=
"?colorSurface"
/>
</shape>
</item>
<item
android:bottom=
"-2dp"
android:left=
"-2dp"
android:right=
"-2dp"
android:top=
"0dp"
>
<shape
android:shape=
"rectangle"
>
<stroke
android:width=
"2px"
android:color=
"#1F000000"
/>
</shape>
</item>
</layer-list>
\ No newline at end of file
app/src/main/res/layout/test.xml
0 → 100644
View file @
a5830599
This diff is collapsed.
Click to expand it.
app/src/main/res/menu/menu_bottom_nav.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
>
<item
android:id=
"@+id/magiskFragment"
android:icon=
"@drawable/ic_magisk_outline"
android:title=
"Home"
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/magiskFragment"
android:icon=
"@drawable/ic_cloud_download"
android:title=
"@string/modules"
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/magiskFragment"
android:icon=
"@drawable/ic_bug_report"
android:title=
"@string/log"
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/settingsFragment"
android:icon=
"@drawable/ic_settings"
android:title=
"@string/settings"
tools:showAsAction=
"always"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/menu_invisible.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:enabled=
"false"
android:title=
""
app:showAsAction=
"always"
/>
</menu>
\ No newline at end of file
app/src/main/res/values-v19/styles_md2.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Foundation.Compat"
>
<item
name=
"android:windowTranslucentNavigation"
>
true
</item>
<item
name=
"android:windowTranslucentStatus"
>
true
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/attrs.xml
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<resources>
<attr
name=
"cardStyle"
format=
"reference"
/>
<!--region Deprecated-->
<attr
name=
"cardStyle"
format=
"reference"
/>
<attr
name=
"colorAccentFallback"
format=
"reference"
/>
<attr
name=
"colorAccentFallback"
format=
"reference"
/>
<attr
name=
"imageColorTint"
format=
"reference"
/>
<attr
name=
"imageColorTint"
format=
"reference"
/>
<attr
name=
"colorControl"
format=
"reference"
/>
<attr
name=
"colorControl"
format=
"reference"
/>
<!--endregion-->
<!--region Widgets-->
<!--region Appbar-->
<attr
name=
"styleAppbar"
format=
"reference"
/>
<!--endregion-->
<!--region Toolbar-->
<attr
name=
"styleToolbar"
format=
"reference"
/>
<attr
name=
"styleToolbarTitle"
format=
"reference"
/>
<!--endregion-->
<!--region Card-->
<attr
name=
"styleCardNormal"
format=
"reference"
/>
<attr
name=
"styleCardOnPrimary"
format=
"reference"
/>
<!--endregion-->
<!--region Button-->
<attr
name=
"styleButtonDefault"
format=
"reference"
/>
<attr
name=
"styleButtonFlat"
format=
"reference"
/>
<attr
name=
"styleButtonText"
format=
"reference"
/>
<!--endregion-->
<!--endregion-->
<!--region Texts-->
<!--region Display-->
<attr
name=
"appearanceTextDisplayNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--region Title-->
<attr
name=
"appearanceTextTitleNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--region Body-->
<attr
name=
"appearanceTextBodyNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--region Caption-->
<attr
name=
"appearanceTextCaptionNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextCaptionVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextCaptionOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextCaptionOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--endregion-->
<!--region Colors-->
<attr
name=
"colorOnPrimaryVariant"
format=
"color"
/>
<attr
name=
"colorOnSurfaceVariant"
format=
"color"
/>
<!--endregion-->
<!--region Dimens-->
<attr
name=
"l_125"
format=
"dimension"
/>
<attr
name=
"l_25"
format=
"dimension"
/>
<attr
name=
"l_50"
format=
"dimension"
/>
<attr
name=
"l1"
format=
"dimension"
/>
<attr
name=
"l2"
format=
"dimension"
/>
<attr
name=
"l3"
format=
"dimension"
/>
<attr
name=
"l4"
format=
"dimension"
/>
<!--endregion-->
</resources>
</resources>
app/src/main/res/values/styles_md2.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style
name=
"Foundation"
parent=
"Theme.MaterialComponents.Light.NoActionBar"
>
<item
name=
"android:windowBackground"
>
?colorSurface
</item>
</style>
<!--This should be overridden in v19 for transparency, etc-->
<style
name=
"Foundation.Compat"
/>
<!--region Do not remove-->
<style
name=
"WidgetFoundation"
/>
<style
name=
"AppearanceFoundation"
/>
<!--endregion-->
<style
name=
"Foundation.Dimen"
parent=
"Foundation.Compat"
>
<item
name=
"l_125"
>
2dp
</item>
<item
name=
"l_25"
>
4dp
</item>
<item
name=
"l_50"
>
8dp
</item>
<item
name=
"l1"
>
16dp
</item>
<item
name=
"l2"
>
32dp
</item>
<item
name=
"l3"
>
48dp
</item>
<item
name=
"l4"
>
64dp
</item>
</style>
<style
name=
"Foundation.Base"
parent=
"Foundation.Dimen"
>
<item
name=
"actionBarSize"
>
60dp
</item>
<item
name=
"styleAppbar"
>
@style/WidgetFoundation.Appbar
</item>
<item
name=
"styleToolbar"
>
@style/WidgetFoundation.Toolbar
</item>
<item
name=
"styleToolbarTitle"
>
@style/WidgetFoundation.Toolbar.Title
</item>
<item
name=
"styleCardNormal"
>
@style/WidgetFoundation.Card
</item>
<item
name=
"styleCardOnPrimary"
>
@style/WidgetFoundation.Card.OnPrimary
</item>
<item
name=
"styleButtonDefault"
>
@style/WidgetFoundation.Button
</item>
<item
name=
"styleButtonFlat"
>
@style/WidgetFoundation.Button.Flat
</item>
<item
name=
"styleButtonText"
>
@style/WidgetFoundation.Button.Text
</item>
<!--///-->
<item
name=
"appearanceTextDisplayNormal"
>
@style/AppearanceFoundation.Display
<
/>
<item
name=
"appearanceTextDisplayVariant"
>
@style/AppearanceFoundation.Display.Variant
<
/>
<item
name=
"appearanceTextDisplayOnPrimary"
>
@style/AppearanceFoundation.Display.OnPrimary
<
/>
<item
name=
"appearanceTextDisplayOnPrimaryVariant"
>
@style/AppearanceFoundation.Display.OnPrimary.Variant
<
/>
<item
name=
"appearanceTextTitleNormal"
>
@style/AppearanceFoundation.Title
<
/>
<item
name=
"appearanceTextTitleVariant"
>
@style/AppearanceFoundation.Title.Variant
<
/>
<item
name=
"appearanceTextTitleOnPrimary"
>
@style/AppearanceFoundation.Title.OnPrimary
<
/>
<item
name=
"appearanceTextTitleOnPrimaryVariant"
>
@style/AppearanceFoundation.Title.OnPrimary.Variant
<
/>
<item
name=
"appearanceTextBodyNormal"
>
@style/AppearanceFoundation.Body
<
/>
<item
name=
"appearanceTextBodyVariant"
>
@style/AppearanceFoundation.Body.Variant
<
/>
<item
name=
"appearanceTextBodyOnPrimary"
>
@style/AppearanceFoundation.Body.OnPrimary
<
/>
<item
name=
"appearanceTextBodyOnPrimaryVariant"
>
@style/AppearanceFoundation.Body.OnPrimary.Variant
<
/>
<item
name=
"appearanceTextCaptionNormal"
>
@style/AppearanceFoundation.Caption
<
/>
<item
name=
"appearanceTextCaptionVariant"
>
@style/AppearanceFoundation.Caption.Variant
<
/>
<item
name=
"appearanceTextCaptionOnPrimary"
>
@style/AppearanceFoundation.Caption.OnPrimary
<
/>
<item
name=
"appearanceTextCaptionOnPrimaryVariant"
>
@style/AppearanceFoundation.Caption.OnPrimary.Variant
<
/>
</style>
<style
name=
"Foundation.Default"
parent=
"Foundation.Base"
>
<item
name=
"colorPrimary"
>
#2196F3
</item>
<item
name=
"colorPrimaryVariant"
>
#802196F3
</item>
<item
name=
"colorSecondary"
>
#00C853
</item>
<item
name=
"colorSecondaryVariant"
>
#8000C853
</item>
<item
name=
"colorSurface"
>
#F2F2F2
</item>
<item
name=
"colorOnPrimary"
>
#F2F2F2
</item>
<item
name=
"colorOnPrimaryVariant"
>
#80F2F2F2
</item>
<item
name=
"colorOnSecondary"
>
#F2F2F2
</item>
<item
name=
"colorOnBackground"
>
#F2F2F2
</item>
<item
name=
"colorError"
>
#CC0047
</item>
<item
name=
"colorOnError"
>
#F2F2F2
</item>
<item
name=
"colorOnSurface"
>
#444444
</item>
<item
name=
"colorOnSurfaceVariant"
>
#80444444
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/styles_md2_appearance.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--region Display-->
<style
name=
"AppearanceFoundation.Display"
parent=
"TextAppearance.AppCompat.Display1"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
<style
name=
"AppearanceFoundation.Display.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurfaceVariant
</item>
</style>
<style
name=
"AppearanceFoundation.Display.OnPrimary"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimary
</item>
</style>
<style
name=
"AppearanceFoundation.Display.OnPrimary.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimaryVariant
</item>
</style>
<!--endregion-->
<!--region Title-->
<style
name=
"AppearanceFoundation.Title"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
<style
name=
"AppearanceFoundation.Title.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurfaceVariant
</item>
</style>
<style
name=
"AppearanceFoundation.Title.OnPrimary"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimary
</item>
</style>
<style
name=
"AppearanceFoundation.Title.OnPrimary.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimaryVariant
</item>
</style>
<!--endregion-->
<!--region Body-->
<style
name=
"AppearanceFoundation.Body"
parent=
"TextAppearance.AppCompat.Body1"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
<style
name=
"AppearanceFoundation.Body.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurfaceVariant
</item>
</style>
<style
name=
"AppearanceFoundation.Body.OnPrimary"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimary
</item>
</style>
<style
name=
"AppearanceFoundation.Body.OnPrimary.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimaryVariant
</item>
</style>
<!--endregion-->
<!--region Caption-->
<style
name=
"AppearanceFoundation.Caption"
parent=
"TextAppearance.AppCompat.Caption"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
<style
name=
"AppearanceFoundation.Caption.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurfaceVariant
</item>
</style>
<style
name=
"AppearanceFoundation.Caption.OnPrimary"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimary
</item>
</style>
<style
name=
"AppearanceFoundation.Caption.OnPrimary.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimaryVariant
</item>
</style>
<!--endregion-->
<!--region Tiny-->
<style
name=
"AppearanceFoundation.Tiny"
parent=
"TextAppearance.AppCompat.Caption"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
<item
name=
"android:textSize"
>
11sp
</item>
<item
name=
"android:fontFamily"
>
sans-serif-medium
</item>
</style>
<style
name=
"AppearanceFoundation.Tiny.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnSurfaceVariant
</item>
</style>
<style
name=
"AppearanceFoundation.Tiny.OnPrimary"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimary
</item>
</style>
<style
name=
"AppearanceFoundation.Tiny.OnPrimary.Variant"
>
<item
name=
"android:textColor"
>
?attr/colorOnPrimaryVariant
</item>
</style>
<!--endregion-->
</resources>
\ No newline at end of file
app/src/main/res/values/styles_md2_impl.xml
0 → 100644
View file @
a5830599
<?xml version="1.0" encoding="utf-8"?>
<!--
These widgets are implementation of corresponding attribute. Never and I mean fucking never! use
these directly.
Although it is possible, it wouldn't automatically change the style when theme changes to "night"
variant. Make sure to use style referenced by attribute defined it attrs.xml.
-->
<resources>
<style
name=
"WidgetFoundation.Appbar"
parent=
"Widget.MaterialComponents.AppBarLayout.Surface"
>
<item
name=
"elevation"
>
0dp
</item>
<item
name=
"android:background"
>
?attr/colorSurface
</item>
</style>
<style
name=
"WidgetFoundation.Toolbar"
parent=
"Widget.MaterialComponents.Toolbar.Surface"
>
<item
name=
"contentInsetStart"
>
0dp
</item>
<item
name=
"contentInsetLeft"
>
0dp
</item>
<item
name=
"contentInsetRight"
>
0dp
</item>
<item
name=
"contentInsetEnd"
>
0dp
</item>
<item
name=
"contentInsetStartWithNavigation"
>
0dp
</item>
</style>
<style
name=
"WidgetFoundation.Toolbar.Title"
parent=
"Widget.MaterialComponents.TextView"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
?attr/actionBarSize
</item>
<item
name=
"android:textAppearance"
>
?appearanceTextTitleNormal
</item>
<item
name=
"android:gravity"
>
start
</item>
<item
name=
"android:layout_gravity"
>
center
</item>
<item
name=
"android:lines"
>
1
</item>
<item
name=
"android:padding"
>
?l1
</item>
</style>
<style
name=
"WidgetFoundation.Card"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardBackgroundColor"
>
?attr/colorSurface
</item>
<item
name=
"cardCornerRadius"
>
?l_50
</item>
<item
name=
"cardElevation"
>
4dp
</item>
</style>
<style
name=
"WidgetFoundation.Card.OnPrimary"
parent=
"Widget.MaterialComponents.CardView"
>
<item
name=
"cardCornerRadius"
>
?l_50
</item>
<item
name=
"cardElevation"
>
0dp
</item>
<item
name=
"strokeColor"
>
?attr/colorOnPrimaryVariant
</item>
<item
name=
"strokeWidth"
>
1dp
</item>
<item
name=
"cardBackgroundColor"
>
?attr/colorPrimary
</item>
</style>
<style
name=
"WidgetFoundation.Button"
parent=
"Widget.MaterialComponents.Button"
>
</style>
<style
name=
"WidgetFoundation.Button.Flat"
parent=
"Widget.MaterialComponents.Button.UnelevatedButton"
>
</style>
<style
name=
"WidgetFoundation.Button.Text"
parent=
"Widget.MaterialComponents.Button.TextButton"
>
</style>
</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