Correct colored status bar implementation for Lollipop, updated status bar colors in some activities to be darker than toolbar color (e.g. tag editor), added elevation to some views, etc. Getting KitKat support again for this colored UI will also come back soon with SystemBarTInt.
This commit is contained in:
parent
0f60a54d50
commit
3028b96634
22 changed files with 323 additions and 193 deletions
|
|
@ -1,6 +1,5 @@
|
|||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context="com.kabouzeid.gramophone.ui.activities.AlbumDetailActivity$PlaceholderFragment">
|
||||
|
|
@ -83,7 +82,9 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="?default_bar_color"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -135,7 +136,8 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="16dp"
|
||||
android:background="?attr/music_controller_container_color"
|
||||
tools:ignore="ContentDescription">
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="ContentDescription,UnusedAttribute">
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
|
|
@ -215,25 +217,10 @@
|
|||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_gravity="top"
|
||||
android:orientation="vertical">
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusMargin"
|
||||
android:background="@android:color/transparent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
||||
</FrameLayout>
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
android:id="@+id/list_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/colorBackground" />
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView
|
||||
android:id="@+id/list"
|
||||
|
|
@ -60,13 +62,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusMargin"
|
||||
android:background="@android:color/transparent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@
|
|||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="8dp">
|
||||
android:paddingTop="8dp"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.kabouzeid.gramophone.views.DynamicEditText
|
||||
android:id="@+id/album_title"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
android:id="@+id/list_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:attr/colorBackground" />
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<com.github.ksoichiro.android.observablescrollview.ObservableListView
|
||||
android:id="@+id/list"
|
||||
|
|
@ -60,13 +62,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusMargin"
|
||||
android:background="@android:color/transparent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
|
|
|
|||
|
|
@ -1,104 +1,103 @@
|
|||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context=".DrawerActivity">
|
||||
|
||||
<android.support.v4.widget.DrawerLayout
|
||||
android:id="@+id/drawer_layout"
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".DrawerActivity">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false" />
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/pager"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="?colorPrimary">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="left|start|center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
|
||||
<com.astuetz.PagerSlidingTabStrip
|
||||
app:pstsTabBackground="?selectableItemBackground"
|
||||
app:pstsIndicatorHeight="3dp"
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipToPadding="false" />
|
||||
android:layout_height="@dimen/tab_height"
|
||||
android:background="?colorPrimary"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
android:paddingLeft="64dp"
|
||||
android:paddingStart="64dp"
|
||||
android:textColor="@color/sliding_tabs_deactivated"
|
||||
android:textColorPrimary="@color/sliding_tabs_activated"
|
||||
app:pstsTabPaddingLeftRight="8dp"
|
||||
tools:ignore="NewApi,RtlSymmetry,UnusedAttribute"
|
||||
android:transitionName="sliding_tabs" />
|
||||
|
||||
<LinearLayout
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/shadow_down" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusMargin"
|
||||
android:background="?attr/colorPrimary"
|
||||
tools:ignore="ContentDescription" />
|
||||
</LinearLayout>
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="?colorPrimary">
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|right|bottom"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/toolbar_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:fontFamily="sans-serif-medium"
|
||||
android:gravity="left|start|center"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="20sp"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</android.support.v7.widget.Toolbar>
|
||||
</LinearLayout>
|
||||
|
||||
<com.astuetz.PagerSlidingTabStrip
|
||||
app:pstsTabBackground="?selectableItemBackground"
|
||||
app:pstsIndicatorHeight="3dp"
|
||||
android:id="@+id/tabs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/tab_height"
|
||||
android:background="?colorPrimary"
|
||||
app:elevation="@dimen/toolbar_elevation"
|
||||
android:paddingLeft="64dp"
|
||||
android:paddingStart="64dp"
|
||||
android:textColor="@color/sliding_tabs_deactivated"
|
||||
android:textColorPrimary="@color/sliding_tabs_activated"
|
||||
app:pstsTabPaddingLeftRight="8dp"
|
||||
tools:ignore="NewApi,RtlSymmetry" />
|
||||
</FrameLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/shadow_down" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|right|bottom"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:ignore="RtlHardcoded">
|
||||
|
||||
<com.melnykov.fab.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
style="@style/PlayPauseFab"
|
||||
android:layout_margin="16dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
<com.kabouzeid.gramophone.views.ScrimInsetsFrameLayout
|
||||
android:id="@+id/nav_drawer_frame"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
android:fitsSystemWindows="true"
|
||||
app:insetForeground="@color/scrim_inset_color"
|
||||
android:clickable="true">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/navigation_drawer"
|
||||
android:name="com.kabouzeid.gramophone.ui.fragments.NavigationDrawerFragment"
|
||||
android:layout_width="@dimen/navigation_drawer_width"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
tools:layout="@layout/fragment_navigation_drawer" />
|
||||
tools:layout="@layout/fragment_navigation_drawer"
|
||||
android:tag="NAV_DRAWER" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
</com.kabouzeid.gramophone.views.ScrimInsetsFrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_album_art"
|
||||
android:transitionName="@string/transition_album_cover"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
tools:ignore="ContentDescription,UnusedAttribute" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
|
|
@ -29,6 +29,7 @@
|
|||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?actionBarSize" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
|
|
@ -93,6 +94,7 @@
|
|||
android:paddingRight="72dp"
|
||||
android:paddingTop="16dp"
|
||||
android:transitionName="@string/transition_album_text"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<TextView
|
||||
|
|
@ -123,7 +125,8 @@
|
|||
android:layout_centerHorizontal="true"
|
||||
android:layout_margin="16dp"
|
||||
android:background="?music_controller_container_color"
|
||||
tools:ignore="ContentDescription">
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="ContentDescription,UnusedAttribute">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/prev_button"
|
||||
|
|
@ -195,24 +198,9 @@
|
|||
android:elevation="2dp"
|
||||
tools:ignore="UnusedAttribute" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/statusBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/statusMargin"
|
||||
android:background="@android:color/transparent"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</LinearLayout>
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
style="@style/Toolbar"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@
|
|||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
@ -31,7 +31,9 @@
|
|||
android:paddingBottom="8dp"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingRight="16dp"
|
||||
android:paddingTop="8dp">
|
||||
android:paddingTop="8dp"
|
||||
android:elevation="@dimen/toolbar_elevation"
|
||||
tools:ignore="UnusedAttribute">
|
||||
|
||||
<com.kabouzeid.gramophone.views.DynamicEditText
|
||||
android:id="@+id/title1"
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@
|
|||
<item name="round_selector">@drawable/round_ripple_selector_dark</item>
|
||||
<item name="rect_selector">@drawable/rect_ripple_selector_dark</item>
|
||||
<item name="list_selector">@drawable/list_ripple_selector_dark</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.MaterialMusic.Light" parent="Theme.MaterialMusic.Base.Light">
|
||||
<item name="round_selector">@drawable/round_ripple_selector</item>
|
||||
<item name="rect_selector">@drawable/rect_ripple_selector</item>
|
||||
<item name="list_selector">@drawable/list_ripple_selector</item>
|
||||
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.MaterialMusic.Notification" parent="@android:style/TextAppearance.Material.Notification" />
|
||||
|
|
|
|||
|
|
@ -24,4 +24,8 @@
|
|||
|
||||
<attr name="toolbarPopupTheme" format="reference" />
|
||||
|
||||
<declare-styleable name="ScrimInsetsView">
|
||||
<attr name="insetForeground" format="reference|color" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
|
@ -36,4 +36,7 @@
|
|||
|
||||
<!--notification-->
|
||||
<drawable name="notification_template_divider_media">#29ffffff</drawable>
|
||||
|
||||
<color name="scrim_inset_color">#40000000</color>
|
||||
|
||||
</resources>
|
||||
|
|
@ -5,7 +5,8 @@
|
|||
<!-- Per the design guidelines, navigation drawers should be between 240dp and 320dp:
|
||||
https://developer.android.com/design/patterns/navigation-drawer.html -->
|
||||
<dimen name="navigation_drawer_image_height">140dp</dimen>
|
||||
<dimen name="navigation_drawer_width">260dp</dimen>
|
||||
<dimen name="nav_drawer_width_limit">320dp</dimen>
|
||||
<dimen name="nav_drawer_margin">56dp</dimen>
|
||||
|
||||
<dimen name="title_view_height">72dp</dimen>
|
||||
<dimen name="toolbar_elevation">2dp</dimen>
|
||||
|
|
@ -43,5 +44,6 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
|||
<dimen name="empty_text_size">20sp</dimen>
|
||||
|
||||
<dimen name="seek_bar_margin_left_right">-17dp</dimen>
|
||||
<dimen name="list_padding_vertical">2dp</dimen>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<resources>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<style name="Theme.MaterialMusic" parent="Theme.MaterialMusic.Base" />
|
||||
|
||||
|
|
@ -43,7 +43,8 @@
|
|||
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
|
||||
<item name="android:minHeight">@dimen/abc_action_bar_default_height_material</item>
|
||||
<item name="popupTheme">?toolbarPopupTheme</item>
|
||||
<item name="elevation">@dimen/toolbar_elevation</item>
|
||||
<item name="android:elevation" tools:ignore="NewApi">@dimen/toolbar_elevation</item>
|
||||
<item name="android:transitionName" tools:ignore="NewApi">toolbar</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -7,13 +7,6 @@
|
|||
<item name="android:windowActionBarOverlay">true</item>
|
||||
<item name="windowActionBarOverlay">true</item>
|
||||
|
||||
<item name="colorPrimary">@color/materialmusic_dark_color</item>
|
||||
<item name="colorPrimaryDark">@color/materialmusic_dark_color_darker</item>
|
||||
<item name="colorAccent">@color/materialmusic_accent_color</item>
|
||||
|
||||
<item name="fab_colorNormal">@color/materialmusic_accent_color</item>
|
||||
<item name="fab_colorPressed">@color/materialmusic_accent_color</item>
|
||||
|
||||
<item name="title_text_color">?android:attr/textColorPrimary</item>
|
||||
<item name="caption_text_color">?android:attr/textColorSecondary</item>
|
||||
|
||||
|
|
@ -46,13 +39,6 @@
|
|||
<item name="windowActionBarOverlay">true</item>
|
||||
<item name="md_dark_theme">false</item>
|
||||
|
||||
<item name="colorPrimary">@color/materialmusic_color</item>
|
||||
<item name="colorPrimaryDark">@color/materialmusic_color_darker</item>
|
||||
<item name="colorAccent">@color/materialmusic_accent_color</item>
|
||||
|
||||
<item name="fab_colorNormal">@color/materialmusic_accent_color</item>
|
||||
<item name="fab_colorPressed">@color/materialmusic_accent_color</item>
|
||||
|
||||
<item name="title_text_color">?android:attr/textColorPrimary</item>
|
||||
<item name="caption_text_color">?android:attr/textColorSecondary</item>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue