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
fbfc4e72
Commit
fbfc4e72
authored
Oct 22, 2019
by
Viktor De Pasquale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated appbar design to be more android-like
parent
d2e171ea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
24 deletions
+40
-24
bg_accent.xml
app/src/main/res/drawable/bg_accent.xml
+0
-10
bg_appbar.xml
app/src/main/res/drawable/bg_appbar.xml
+15
-0
activity_main_md2.xml
app/src/main/res/layout/activity_main_md2.xml
+18
-9
fragment_home_md2.xml
app/src/main/res/layout/fragment_home_md2.xml
+2
-2
fragment_settings_md2.xml
app/src/main/res/layout/fragment_settings_md2.xml
+2
-1
fragment_superuser_md2.xml
app/src/main/res/layout/fragment_superuser_md2.xml
+2
-1
styles_md2_impl.xml
app/src/main/res/values/styles_md2_impl.xml
+1
-1
No files found.
app/src/main/res/drawable/bg_accent.xml
deleted
100644 → 0
View file @
d2e171ea
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<gradient
android:angle=
"135"
android:endColor=
"?colorSecondary"
android:startColor=
"?colorPrimary"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/bg_appbar.xml
0 → 100644
View file @
fbfc4e72
<?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/layout/activity_main_md2.xml
View file @
fbfc4e72
...
...
@@ -24,32 +24,41 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
<com.google.android.material.card.MaterialCardView
style=
"?styleCardElevated"
<com.google.android.material.appbar.AppBarLayout
android:id=
"@+id/main_toolbar_wrapper"
style=
"?styleAppbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:id=
"@+id/main_toolbar_wrapper"
android:layout_marginStart=
"@dimen/l1"
android:layout_marginTop=
"@{(int) @dimen/l1 + viewModel.insets.top}"
android:layout_marginEnd=
"@dimen/l1"
tools:layout_marginTop=
"40dp"
>
android:paddingTop=
"@{viewModel.insets.top}"
>
<com.google.android.material.appbar.MaterialToolbar
android:id=
"@+id/main_toolbar"
style=
"?styleToolbar"
android:layout_width=
"match_parent"
android:background=
"@android:color/transparent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_scrollFlags=
"noScroll"
tools:layout_marginTop=
"24dp"
tools:title=
"Home"
/>
</com.google.android.material.appbar.AppBarLayout>
<!--<com.google.android.material.card.MaterialCardView
style="?styleCardElevated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/main_toolbar_wrapper"
android:layout_marginStart="@dimen/l1"
android:layout_marginEnd="@dimen/l1">
<View
android:layout_width="match_parent"
android:layout_height="3dp"
android:layout_gravity="start|bottom"
android:background="@drawable/bg_accent" />
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.card.MaterialCardView>
-->
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/main_bottom_bar"
...
...
app/src/main/res/layout/fragment_home_md2.xml
View file @
fbfc4e72
...
...
@@ -21,7 +21,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:clipToPadding=
"false"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size
+ (int) @dimen/l2
}"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
android:paddingBottom=
"@{viewModel.insets.bottom + (int) @dimen/l2}"
tools:layout_marginTop=
"24dp"
>
...
...
@@ -36,7 +36,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/l
1
"
>
android:paddingTop=
"@dimen/l
2
"
>
<com.google.android.material.card.MaterialCardView
android:id=
"@+id/home_magisk_wrapper"
...
...
app/src/main/res/layout/fragment_settings_md2.xml
View file @
fbfc4e72
...
...
@@ -16,13 +16,14 @@
android:layout_height=
"match_parent"
android:clipToPadding=
"false"
android:fillViewport=
"true"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size
+ (int) @dimen/l2
}"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
android:paddingBottom=
"@{viewModel.insets.bottom + (int) @dimen/l2}"
tools:layout_marginTop=
"24dp"
tools:paddingTop=
"@dimen/l1"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:paddingTop=
"@dimen/l1"
android:layout_height=
"wrap_content"
>
<com.google.android.material.card.MaterialCardView
...
...
app/src/main/res/layout/fragment_superuser_md2.xml
View file @
fbfc4e72
...
...
@@ -18,7 +18,7 @@
android:layout_height=
"match_parent"
android:clipToPadding=
"false"
android:fillViewport=
"true"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size
+ (int) @dimen/l2
}"
android:paddingTop=
"@{viewModel.insets.top + (int) @dimen/internal_action_bar_size}"
android:paddingBottom=
"@{viewModel.insets.bottom + (int) @dimen/l2}"
tools:layout_marginTop=
"24dp"
tools:paddingTop=
"@dimen/l1"
>
...
...
@@ -26,6 +26,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingTop=
"@dimen/l1"
android:orientation=
"vertical"
>
<com.google.android.material.card.MaterialCardView
...
...
app/src/main/res/values/styles_md2_impl.xml
View file @
fbfc4e72
...
...
@@ -9,7 +9,7 @@ variant. Make sure to use style referenced by attribute defined it attrs.xml.
<style
name=
"WidgetFoundation.Appbar"
parent=
"Widget.MaterialComponents.AppBarLayout.Surface"
>
<item
name=
"elevation"
>
0dp
</item>
<item
name=
"android:background"
>
?colorSurfaceVariant
</item>
<item
name=
"android:background"
>
@drawable/bg_appbar
</item>
</style>
<style
name=
"WidgetFoundation.Toolbar"
parent=
"Widget.MaterialComponents.Toolbar.Surface"
>
...
...
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