Improve toolbar scrim

This commit is contained in:
Eugene Cheung 2017-09-09 16:50:59 -04:00
commit 0f6aab7f2c
No known key found for this signature in database
GPG key ID: E1FD745328866B0A
12 changed files with 96 additions and 28 deletions

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="90"
android:centerY="0.33"
android:endColor="@color/thirty_three_percent_black_overlay"
android:startColor="#00000000" />
</shape>

View file

@ -58,13 +58,21 @@
</RelativeLayout>
<include layout="@layout/shadow_statusbar_toolbar" />
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="wrap_content"
android:layout_height="@dimen/toolbar_scrim_height"
android:background="@drawable/toolbar_gradient">
<android.support.v7.widget.Toolbar
android:id="@+id/player_toolbar"
style="@style/Toolbar"
android:layout_marginTop="@dimen/status_bar_padding"
android:background="@android:color/transparent" />
<include layout="@layout/shadow_statusbar_toolbar" />
<android.support.v7.widget.Toolbar
android:id="@+id/player_toolbar"
style="@style/Toolbar"
android:layout_marginTop="@dimen/status_bar_padding"
android:background="@android:color/transparent" />
</FrameLayout>
</FrameLayout>

View file

@ -56,12 +56,18 @@
</FrameLayout>
<include layout="@layout/shadow_toolbar" />
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="@dimen/toolbar_scrim_height"
android:background="@drawable/toolbar_gradient">
<android.support.v7.widget.Toolbar
android:id="@+id/player_toolbar"
style="@style/Toolbar"
android:background="@android:color/transparent" />
<android.support.v7.widget.Toolbar
android:id="@+id/player_toolbar"
style="@style/Toolbar"
android:background="@android:color/transparent" />
</FrameLayout>
</FrameLayout>

View file

@ -19,7 +19,7 @@
<View
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_height="112dp"
android:layout_gravity="bottom"
android:background="@drawable/shadow_up" />

View file

@ -22,9 +22,9 @@
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="@dimen/toolbar_scrim_height"
android:layout_alignBottom="@id/dummy_statusbar_actionbar"
android:layout_alignTop="@id/dummy_statusbar_actionbar"
android:background="@drawable/shadow_down" />
android:background="@drawable/toolbar_gradient" />
</RelativeLayout>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@drawable/shadow_down" />

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="twenty_percent_black_overlay">#34000000</color>
<color name="thirty_three_percent_black_overlay">#54000000</color>
<color name="app_shortcut_default_foreground">#607d8b</color>
<color name="app_shortcut_default_background">#f5f5f5</color>

View file

@ -6,6 +6,9 @@
<dimen name="toolbar_elevation">4dp</dimen>
<dimen name="card_elevation">2dp</dimen>
<!-- 3x standard action bar height (56dp) -->
<dimen name="toolbar_scrim_height">168dp</dimen>
<dimen name="header_image_height">360dp</dimen>
<dimen name="progress_container_height">20dp</dimen>
<dimen name="fab_media_controller_container_height">120dp</dimen>