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
122e2f7a
Commit
122e2f7a
authored
Sep 30, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated styles and simplified dimension usage
parent
b4e1585e
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
238 additions
and
150 deletions
+238
-150
color_error_transient.xml
app/src/main/res/color/color_error_transient.xml
+5
-0
color_primary_transient.xml
app/src/main/res/color/color_primary_transient.xml
+5
-0
color_text_transient.xml
app/src/main/res/color/color_text_transient.xml
+5
-0
bg_circle.xml
app/src/main/res/drawable/bg_circle.xml
+0
-14
bg_divider_top.xml
app/src/main/res/drawable/bg_divider_top.xml
+0
-21
ic_delete_md2.xml
app/src/main/res/drawable/ic_delete_md2.xml
+10
-0
ic_home.xml
app/src/main/res/drawable/ic_home.xml
+10
-0
ic_install.xml
app/src/main/res/drawable/ic_install.xml
+10
-0
ic_update_md2.xml
app/src/main/res/drawable/ic_update_md2.xml
+10
-0
test.xml
app/src/main/res/layout/test.xml
+93
-64
menu_bottom_nav.xml
app/src/main/res/menu/menu_bottom_nav.xml
+7
-1
attrs.xml
app/src/main/res/values/attrs.xml
+29
-25
dimens.xml
app/src/main/res/values/dimens.xml
+6
-4
styles_md2.xml
app/src/main/res/values/styles_md2.xml
+15
-10
styles_md2_appearance.xml
app/src/main/res/values/styles_md2_appearance.xml
+5
-6
styles_md2_impl.xml
app/src/main/res/values/styles_md2_impl.xml
+28
-5
No files found.
app/src/main/res/color/color_error_transient.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"?colorDisabled"
android:state_enabled=
"false"
/>
<item
android:color=
"?colorError"
/>
</selector>
\ No newline at end of file
app/src/main/res/color/color_primary_transient.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"?colorDisabled"
android:state_enabled=
"false"
/>
<item
android:color=
"?colorPrimary"
/>
</selector>
\ No newline at end of file
app/src/main/res/color/color_text_transient.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:color=
"?colorDisabled"
android:state_enabled=
"false"
/>
<item
android:color=
"?colorOnSurface"
/>
</selector>
\ No newline at end of file
app/src/main/res/drawable/bg_circle.xml
deleted
100644 → 0
View file @
b4e1585e
<?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
deleted
100644 → 0
View file @
b4e1585e
<?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/drawable/ic_delete_md2.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"?colorOnPrimary"
android:pathData=
"M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_home.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"?colorOnPrimary"
android:pathData=
"M12 5.69L17 10.19V18H15V12H9V18H7V10.19L12 5.69M12 3L2 12H5V20H11V14H13V20H19V12H22L12 3Z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_install.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"?colorOnSurface"
android:pathData=
"M12,18L7,13H10V9H14V13H17L12,18M10,2H14A2,2 0 0,1 16,4V6H20A2,2 0 0,1 22,8V19A2,2 0 0,1 20,21H4C2.89,21 2,20.1 2,19V8C2,6.89 2.89,6 4,6H8V4C8,2.89 8.89,2 10,2M14,6V4H10V6H14M4,8V19H20V8H4Z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_update_md2.xml
0 → 100644
View file @
122e2f7a
<?xml version="1.0" encoding="utf-8"?>
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24"
android:viewportHeight=
"24"
>
<path
android:fillColor=
"?colorOnSurface"
android:pathData=
"M17,1H7A2,2 0 0,0 5,3V21A2,2 0 0,0 7,23H17A2,2 0 0,0 19,21V3A2,2 0 0,0 17,1M17,19H7V5H17V19M16,13H13V8H11V13H8L12,17L16,13Z"
/>
</vector>
\ No newline at end of file
app/src/main/res/layout/test.xml
View file @
122e2f7a
...
...
@@ -10,21 +10,7 @@
style=
"?styleAppbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_gravity=
"center_horizontal|bottom"
android:background=
"@drawable/bg_circle"
app:layout_constraintBottom_toBottomOf=
"@+id/home_toolbar"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
android:background=
"?colorSurfaceVariant"
>
<com.google.android.material.appbar.MaterialToolbar
android:id=
"@+id/home_toolbar"
...
...
@@ -39,14 +25,13 @@
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingBottom=
"?
l1"
>
android:paddingBottom=
"@dimen/
l1"
>
<androidx.appcompat.widget.AppCompatTextView
style=
"?styleToolbarTitle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center"
android:textColor=
"?colorOnPrimary"
tools:text=
"Home"
/>
<View
...
...
@@ -59,20 +44,20 @@
</com.google.android.material.appbar.MaterialToolbar>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:clipToPadding=
"false"
android:orientation=
"vertical"
android:padding=
"
?
l1"
android:padding=
"
@dimen/
l1"
app:layout_behavior=
"com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/l1"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/home_magisk_wrapper"
...
...
@@ -94,7 +79,7 @@
android:id=
"@+id/title1"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
?
l1"
android:layout_marginStart=
"
@dimen/
l1"
android:text=
"Magisk"
android:textAppearance=
"?appearanceTextTitleNormal"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -112,9 +97,13 @@
app:layout_constraintTop_toBottomOf=
"@+id/title1"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:id=
"@+id/button_container1"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"?l1"
android:layout_marginTop=
"@dimen/l1"
android:layout_marginEnd=
"@dimen/l_50"
app:layout_constraintEnd_toStartOf=
"@+id/delete1"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/status1"
>
<com.google.android.material.button.MaterialButton
...
...
@@ -122,23 +111,39 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/update"
app:icon=
"@drawable/ic_update_md2"
app:iconGravity=
"textEnd"
app:iconPadding=
"@dimen/l_50"
app:iconSize=
"18dp"
tools:visibility=
"gone"
/>
<com.google.android.material.button.MaterialButton
style=
"?styleButtonText"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/install"
/>
android:text=
"@string/install"
app:icon=
"@drawable/ic_install"
app:iconGravity=
"textEnd"
app:iconPadding=
"@dimen/l_50"
app:iconSize=
"18dp"
/>
</FrameLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id=
"@+id/delete1"
style=
"?styleIconError"
app:layout_constraintBottom_toBottomOf=
"@+id/button_container1"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintTop_toTopOf=
"@+id/button_container1"
app:srcCompat=
"@drawable/ic_delete_md2"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id=
"@+id/home_manager_wrapper"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
?
l1"
android:layout_marginStart=
"
@dimen/
l1"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@+id/home_magisk_wrapper"
app:layout_constraintTop_toTopOf=
"parent"
>
...
...
@@ -155,7 +160,7 @@
android:id=
"@+id/title1"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
?
l1"
android:layout_marginStart=
"
@dimen/
l1"
android:text=
"Manager"
android:textAppearance=
"?appearanceTextTitleNormal"
app:layout_constraintEnd_toEndOf=
"parent"
...
...
@@ -175,20 +180,28 @@
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"
?
l1"
android:layout_marginTop=
"
@dimen/
l1"
app:layout_constraintTop_toBottomOf=
"@+id/status1"
>
<com.google.android.material.button.MaterialButton
style=
"?styleButtonDefault"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/update"
/>
android:text=
"@string/update"
app:icon=
"@drawable/ic_update_md2"
app:iconGravity=
"textEnd"
app:iconPadding=
"@dimen/l_50"
app:iconSize=
"18dp"
/>
<com.google.android.material.button.MaterialButton
style=
"?styleButtonText"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:text=
"@string/install"
app:icon=
"@drawable/ic_install"
app:iconGravity=
"textEnd"
app:iconPadding=
"@dimen/l_50"
app:iconSize=
"18dp"
tools:visibility=
"gone"
/>
</FrameLayout>
...
...
@@ -197,17 +210,23 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginTop=
"@dimen/l2"
android:layout_marginBottom=
"@dimen/l2"
android:background=
"?colorSurfaceVariant"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardNormal"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"?l1"
>
android:layout_height=
"wrap_content"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
android:padding=
"
?
l1"
>
android:padding=
"
@dimen/
l1"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
...
...
@@ -230,24 +249,34 @@
</LinearLayout>
<com.google.android.material.bottomnavigation.BottomNavigationView
<com.google.android.material.bottomappbar.BottomAppBar
android:id=
"@+id/home_bottom_bar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@drawable/bg_divider_top"
android:paddingBottom=
"48dp"
app:itemIconSize=
"20dp"
app:contentInsetEnd=
"0dp"
app:contentInsetStart=
"0dp"
app:fabCradleMargin=
"@dimen/l_50"
>
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/transparent"
app:itemIconTint=
"@color/color_menu_tint"
app:itemTextAppearanceActive=
"@style/AppearanceFoundation.Tiny
"
app:itemTextAppearanceInactive=
"@style/AppearanceFoundation.Tiny
"
app:itemTextAppearanceActive=
"@style/AppearanceFoundation.Tiny.Bold
"
app:itemTextAppearanceInactive=
"@style/AppearanceFoundation.Tiny.Bold
"
app:itemTextColor=
"@color/color_menu_tint"
app:labelVisibilityMode=
"
labeled"
app:labelVisibilityMode=
"un
labeled"
app:menu=
"@menu/menu_bottom_nav"
/>
<!--<com.google.android.material.floatingactionbutton.FloatingActionButton
</com.google.android.material.bottomappbar.BottomAppBar>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
app:fabSize=
"normal"
app:layout_anchor="@+id/home_bottom_bar" />-->
app:layout_anchor=
"@+id/home_bottom_bar"
app:srcCompat=
"@drawable/ic_superuser"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
\ No newline at end of file
app/src/main/res/menu/menu_bottom_nav.xml
View file @
122e2f7a
...
...
@@ -4,7 +4,7 @@
<item
android:id=
"@+id/magiskFragment"
android:icon=
"@drawable/ic_
magisk_outlin
e"
android:icon=
"@drawable/ic_
hom
e"
android:title=
"Home"
tools:showAsAction=
"always"
/>
...
...
@@ -14,6 +14,12 @@
android:title=
"@string/modules"
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/fake"
android:enabled=
"false"
android:title=
""
tools:showAsAction=
"always"
/>
<item
android:id=
"@+id/magiskFragment"
android:icon=
"@drawable/ic_bug_report"
...
...
app/src/main/res/values/attrs.xml
View file @
122e2f7a
...
...
@@ -9,67 +9,71 @@
<!--region Widgets-->
<!--
region
Appbar-->
<!--Appbar-->
<attr
name=
"styleAppbar"
format=
"reference"
/>
<!--endregion-->
<!--
region
Toolbar-->
<!--Toolbar-->
<attr
name=
"styleToolbar"
format=
"reference"
/>
<attr
name=
"styleToolbarTitle"
format=
"reference"
/>
<!--endregion-->
<!--
region
Card-->
<!--Card-->
<attr
name=
"styleCardNormal"
format=
"reference"
/>
<attr
name=
"styleCardOnPrimary"
format=
"reference"
/>
<!--endregion-->
<!--
region
Button-->
<!--Button-->
<attr
name=
"styleButtonDefault"
format=
"reference"
/>
<attr
name=
"styleButtonFlat"
format=
"reference"
/>
<attr
name=
"styleButtonText"
format=
"reference"
/>
<!--endregion-->
<attr
name=
"styleButtonError"
format=
"reference"
/>
<!--Icon-->
<attr
name=
"styleIconNormal"
format=
"reference"
/>
<attr
name=
"styleIconPrimary"
format=
"reference"
/>
<attr
name=
"styleIconError"
format=
"reference"
/>
<!--endregion-->
<!--region Texts-->
<!--
region
Display-->
<!--Display-->
<attr
name=
"appearanceTextDisplayNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextDisplayOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--
region
Title-->
<!--Title-->
<attr
name=
"appearanceTextTitleNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextTitleOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--
region
Body-->
<!--Body-->
<attr
name=
"appearanceTextBodyNormal"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyVariant"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyOnPrimary"
format=
"reference"
/>
<attr
name=
"appearanceTextBodyOnPrimaryVariant"
format=
"reference"
/>
<!--endregion-->
<!--
region
Caption-->
<!--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-->
<!--Transient-->
<attr
name=
"colorTextTransient"
format=
"reference"
/>
<attr
name=
"colorPrimaryTransient"
format=
"reference"
/>
<attr
name=
"colorErrorTransient"
format=
"reference"
/>
<!--Static-->
<attr
name=
"colorDisabled"
format=
"color"
/>
<attr
name=
"colorSurfaceVariant"
format=
"color"
/>
<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>
app/src/main/res/values/dimens.xml
View file @
122e2f7a
...
...
@@ -3,13 +3,15 @@
<dimen
name=
"card_elevation"
>
2dp
</dimen>
<dimen
name=
"fab_padding"
>
16dp
</dimen>
<!--new dimens-->
<dimen
name=
"margin_generic_double"
>
32dp
</dimen>
<dimen
name=
"margin_generic"
>
16dp
</dimen>
<dimen
name=
"margin_generic_half"
>
8dp
</dimen>
<dimen
name=
"radius_generic"
>
8dp
</dimen>
<!--new dimens ^^-->
<dimen
name=
"l_125"
>
2dp
</dimen>
<dimen
name=
"l_25"
>
4dp
</dimen>
<dimen
name=
"l_50"
>
8dp
</dimen>
<dimen
name=
"l_75"
>
12dp
</dimen>
<dimen
name=
"l1"
>
16dp
</dimen>
<dimen
name=
"l2"
>
32dp
</dimen>
</resources>
\ No newline at end of file
app/src/main/res/values/styles_md2.xml
View file @
122e2f7a
...
...
@@ -14,17 +14,12 @@
<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.Compat"
>
<item
name=
"android:fontFamily"
>
@font/exo
</item>
<item
name=
"android:includeFontPadding"
>
false
</item>
<!--///-->
<style
name=
"Foundation.Base"
parent=
"Foundation.Dimen"
>
<item
name=
"actionBarSize"
>
60dp
</item>
<item
name=
"styleAppbar"
>
@style/WidgetFoundation.Appbar
</item>
...
...
@@ -38,6 +33,11 @@
<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=
"styleButtonError"
>
@style/WidgetFoundation.Button.Error
</item>
<item
name=
"styleIconNormal"
>
@style/WidgetFoundation.Icon
</item>
<item
name=
"styleIconPrimary"
>
@style/WidgetFoundation.Icon.Primary
</item>
<item
name=
"styleIconError"
>
@style/WidgetFoundation.Icon.Error
</item>
<!--///-->
...
...
@@ -76,6 +76,7 @@
<item
name=
"colorSecondary"
>
#00C853
</item>
<item
name=
"colorSecondaryVariant"
>
#8000C853
</item>
<item
name=
"colorSurface"
>
#F2F2F2
</item>
<item
name=
"colorSurfaceVariant"
>
#0D000000
</item>
<item
name=
"colorOnPrimary"
>
#F2F2F2
</item>
<item
name=
"colorOnPrimaryVariant"
>
#80F2F2F2
</item>
<item
name=
"colorOnSecondary"
>
#F2F2F2
</item>
...
...
@@ -84,6 +85,10 @@
<item
name=
"colorOnError"
>
#F2F2F2
</item>
<item
name=
"colorOnSurface"
>
#444444
</item>
<item
name=
"colorOnSurfaceVariant"
>
#80444444
</item>
<item
name=
"colorDisabled"
>
#808080
</item>
<item
name=
"colorTextTransient"
>
@color/color_text_transient
</item>
<item
name=
"colorPrimaryTransient"
>
@color/color_primary_transient
</item>
<item
name=
"colorErrorTransient"
>
@color/color_error_transient
</item>
</style>
</resources>
\ No newline at end of file
app/src/main/res/values/styles_md2_appearance.xml
View file @
122e2f7a
...
...
@@ -3,7 +3,6 @@
<!--region Display-->
<style
name=
"AppearanceFoundation.Display"
parent=
"TextAppearance.AppCompat.Display1"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
...
...
@@ -22,8 +21,8 @@
<!--region Title-->
<style
name=
"AppearanceFoundation.Title"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"AppearanceFoundation.Title.Variant"
>
...
...
@@ -41,7 +40,6 @@
<!--region Body-->
<style
name=
"AppearanceFoundation.Body"
parent=
"TextAppearance.AppCompat.Body1"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
...
...
@@ -60,7 +58,6 @@
<!--region Caption-->
<style
name=
"AppearanceFoundation.Caption"
parent=
"TextAppearance.AppCompat.Caption"
>
<item
name=
"android:includeFontPadding"
>
false
</item>
<item
name=
"android:textColor"
>
?attr/colorOnSurface
</item>
</style>
...
...
@@ -79,10 +76,12 @@
<!--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.Bold"
>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"AppearanceFoundation.Tiny.Variant"
>
...
...
app/src/main/res/values/styles_md2_impl.xml
View file @
122e2f7a
...
...
@@ -27,18 +27,18 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
<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>
<item
name=
"android:padding"
>
@dimen/
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=
"cardCornerRadius"
>
@dimen/
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=
"cardCornerRadius"
>
@dimen/
l_50
</item>
<item
name=
"cardElevation"
>
0dp
</item>
<item
name=
"strokeColor"
>
?attr/colorOnPrimaryVariant
</item>
<item
name=
"strokeWidth"
>
1dp
</item>
...
...
@@ -47,15 +47,38 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
<style
name=
"WidgetFoundation.Button"
parent=
"Widget.MaterialComponents.Button"
>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"WidgetFoundation.Button.Flat"
parent=
"Widget.MaterialComponents.Button.UnelevatedButton"
>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"WidgetFoundation.Button.Text"
parent=
"Widget.MaterialComponents.Button.TextButton"
>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"WidgetFoundation.Button.Error"
parent=
"WidgetFoundation.Button.Text"
>
<item
name=
"rippleColor"
>
?colorError
</item>
<item
name=
"android:textColor"
>
?colorError
</item>
<item
name=
"iconTint"
>
?colorError
</item>
</style>
<style
name=
"WidgetFoundation.Icon"
>
<item
name=
"android:layout_width"
>
48dp
</item>
<item
name=
"android:layout_height"
>
48dp
</item>
<item
name=
"android:padding"
>
@dimen/l_75
</item>
<item
name=
"android:background"
>
?selectableItemBackgroundBorderless
</item>
<item
name=
"tint"
>
?colorTextTransient
</item>
</style>
<style
name=
"WidgetFoundation.Icon.Primary"
>
<item
name=
"tint"
>
?colorPrimaryTransient
</item>
</style>
<style
name=
"WidgetFoundation.Icon.Error"
>
<item
name=
"tint"
>
?colorErrorTransient
</item>
</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