Reorganized settings, added more options to customize the now playing screen, added gradients to make UI elements visible on light album covers, fixed a bug with cardview background, fixed typos, increased version code, synced strings,

This commit is contained in:
Karim Abou Zeid 2015-06-10 23:02:14 +02:00
commit a87320fcc9
43 changed files with 607 additions and 135 deletions

View file

@ -69,6 +69,8 @@
</LinearLayout>
<include layout="@layout/shadow_statusbar_actionbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -128,6 +128,11 @@
</com.github.ksoichiro.android.observablescrollview.ObservableScrollView>
<View
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@drawable/shadow_down" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"

View file

@ -70,6 +70,8 @@
</LinearLayout>
<include layout="@layout/shadow_statusbar_actionbar" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context="com.kabouzeid.gramophone.ui.activities.MusicControllerActivity">
<!-- BOTTOM-->
@ -68,10 +69,10 @@
android:background="?default_bar_color"
android:elevation="@dimen/toolbar_elevation"
android:orientation="vertical"
android:paddingBottom="32dp"
android:paddingBottom="@dimen/title_box_padding_large"
android:paddingLeft="72dp"
android:paddingRight="72dp"
android:paddingTop="32dp"
android:paddingTop="@dimen/title_box_padding_large"
android:transitionName="@string/transition_album_text"
tools:ignore="UnusedAttribute">
@ -82,19 +83,16 @@
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?attr/title_text_color"
android:textSize="24sp" />
android:textColor="?attr/title_text_color" />
<TextView
android:id="@+id/song_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:paddingTop="4dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textColor="?attr/caption_text_color"
android:textSize="14sp" />
android:textColor="?attr/caption_text_color" />
</LinearLayout>
@ -103,17 +101,24 @@
android:layout_width="match_parent"
android:layout_height="@dimen/media_controller_container_height"
android:background="?music_controller_container_color"
android:paddingLeft="16dp"
android:paddingRight="16dp"
tools:ignore="ContentDescription,UnusedAttribute">
<android.support.v7.widget.CardView
app:cardBackgroundColor="?music_controller_container_color"
android:id="@+id/playback_controller_card"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/prev_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_centerVertical="true"
android:layout_marginEnd="-8dp"
android:layout_marginRight="-8dp"
android:layout_marginEnd="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_marginRight="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_toLeftOf="@+id/fab"
android:layout_toStartOf="@+id/fab"
android:background="?round_selector"
@ -122,12 +127,13 @@
android:src="@drawable/ic_skip_previous_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/next_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_centerVertical="true"
android:layout_marginLeft="-8dp"
android:layout_marginStart="-8dp"
android:layout_marginLeft="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_marginStart="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_toEndOf="@+id/fab"
android:layout_toRightOf="@+id/fab"
android:background="?round_selector"
@ -136,28 +142,30 @@
android:src="@drawable/ic_skip_next_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/repeat_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginLeft="24dp"
android:layout_marginStart="24dp"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_repeat_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/shuffle_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
@ -167,7 +175,7 @@
android:id="@+id/fab"
style="@style/PlayPauseFab"
android:layout_centerInParent="true"
android:layout_margin="@dimen/tmp_no_fab_margin" />
android:layout_margin="0dp" />
</RelativeLayout>
@ -202,18 +210,16 @@
<!-- TOOLBAR-->
<LinearLayout
android:id="@+id/toolbar_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="@layout/shadow_statusbar_actionbar" />
<include layout="@layout/status_bar" />
<include
android:id="@+id/status_bar"
layout="@layout/status_bar" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:background="#00000000" />
</LinearLayout>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:layout_below="@id/status_bar"
android:background="#00000000" />
</RelativeLayout>

View file

@ -0,0 +1,225 @@
<RelativeLayout 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:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.kabouzeid.gramophone.ui.activities.MusicControllerActivity">
<!-- BOTTOM-->
<LinearLayout
android:id="@+id/footer_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="?android:colorBackground"
android:orientation="vertical">
<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?default_bar_color"
android:elevation="@dimen/toolbar_elevation"
android:orientation="vertical"
android:paddingBottom="@dimen/title_box_padding_large"
android:paddingLeft="72dp"
android:paddingRight="72dp"
android:paddingTop="@dimen/title_box_padding_large"
android:transitionName="@string/transition_album_text"
tools:ignore="UnusedAttribute">
<TextView
android:id="@+id/song_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?attr/title_text_color" />
<TextView
android:id="@+id/song_artist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:textColor="?attr/caption_text_color" />
</LinearLayout>
<RelativeLayout
android:id="@+id/media_controller_container"
android:layout_width="match_parent"
android:layout_height="@dimen/media_controller_container_height"
android:background="?music_controller_container_color"
tools:ignore="ContentDescription,UnusedAttribute">
<android.support.v7.widget.CardView
app:cardBackgroundColor="?music_controller_container_color"
android:id="@+id/playback_controller_card"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/prev_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_marginRight="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_toLeftOf="@+id/fab"
android:layout_toStartOf="@+id/fab"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_skip_previous_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/next_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_marginStart="@dimen/tmp_now_playing_skip_rewind_margin"
android:layout_toEndOf="@+id/fab"
android:layout_toRightOf="@+id/fab"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_skip_next_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/repeat_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:layout_marginLeft="24dp"
android:layout_marginStart="24dp"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_repeat_white_48dp" />
<ImageButton
android:elevation="8dp"
android:id="@+id/shuffle_button"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp"
android:background="?round_selector"
android:padding="22dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_shuffle_white_48dp" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
style="@style/PlayPauseFab"
android:layout_centerInParent="true"
android:layout_margin="0dp" />
</RelativeLayout>
</LinearLayout>
<!-- ALBUMART-->
<FrameLayout
android:id="@+id/album_art_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/footer_frame"
android:background="@color/black">
<ImageView
android:id="@+id/album_art_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
tools:ignore="ContentDescription" />
<com.kabouzeid.gramophone.views.SquareIfPlaceImageView
android:id="@+id/album_art"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:scaleType="centerCrop"
android:src="@drawable/default_album_art"
android:transitionName="@string/transition_album_cover"
tools:ignore="ContentDescription,UnusedAttribute" />
<RelativeLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/shadow_up">
<TextView
android:id="@+id/song_current_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:padding="16dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@android:color/white"
android:textSize="16sp"
tools:ignore="RtlHardcoded,RtlSymmetry,SmallSp" />
<TextView
android:id="@+id/song_total_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:padding="16dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="@android:color/white"
android:textSize="16sp"
tools:ignore="RtlHardcoded,RtlSymmetry,SmallSp" />
</RelativeLayout>
</FrameLayout>
<!-- PROGRESS SLIDER-->
<SeekBar
android:id="@+id/progress_slider"
style="@style/TraditionalMusicProgressSlider"
android:layout_above="@+id/footer_frame"
android:elevation="2dp"
tools:ignore="UnusedAttribute" />
<!-- TOOLBAR-->
<include layout="@layout/shadow_statusbar_actionbar" />
<include
android:id="@+id/status_bar"
layout="@layout/status_bar" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
android:layout_below="@id/status_bar"
android:background="#00000000" />
</RelativeLayout>

View file

@ -5,11 +5,11 @@
android:layout_height="148dp"
android:layout_marginRight="8dp"
android:layout_marginEnd="8dp"
app:cardBackgroundColor="?default_bar_color"
app:elevation="3dp"
android:foreground="?rect_selector">
<LinearLayout
android:background="?default_bar_color"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="vertical"
android:id="@+id/dummy_statusbar_actionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" />
<View
android:layout_width="match_parent"
android:layout_height="?actionBarSize" />
</LinearLayout>
<View
android:layout_alignBottom="@id/dummy_statusbar_actionbar"
android:layout_alignTop="@id/dummy_statusbar_actionbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shadow_down" />
</RelativeLayout>