diff options
author | linus_lee <llee@cyngn.com> | 2014-09-09 16:28:10 -0700 |
---|---|---|
committer | linus_lee <llee@cyngn.com> | 2014-11-20 12:03:03 -0800 |
commit | 159e1c3e84b569437792cd4d7c2c99701dfa29fe (patch) | |
tree | c536f8ba849f3a28728562dc22f00dcc31edcf8b /res | |
parent | f764f67c5a52b3b3a508062f6445727933a68210 (diff) | |
download | android_packages_apps_Eleven-159e1c3e84b569437792cd4d7c2c99701dfa29fe.tar.gz android_packages_apps_Eleven-159e1c3e84b569437792cd4d7c2c99701dfa29fe.tar.bz2 android_packages_apps_Eleven-159e1c3e84b569437792cd4d7c2c99701dfa29fe.zip |
Eleven: Change playlist to the new layout, rip out dead code
Still missing the image based on the top played - this turned out to be larger so I'm
moving that to a separate changelist. Some code similar to the ArtistDetailPage but
not enough to warrant sharing of code
Change-Id: I84454590c8d9580ca42ac8254bc3648368d233a3
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-xxhdpi/playlist_icon.png | bin | 0 -> 387 bytes | |||
-rw-r--r-- | res/drawable-xxhdpi/stopwatch_icon_white.png | bin | 0 -> 893 bytes | |||
-rw-r--r-- | res/layout/faux_playlist_header.xml | 25 | ||||
-rw-r--r-- | res/layout/playlist_detail.xml | 19 | ||||
-rw-r--r-- | res/layout/playlist_detail_header.xml | 60 | ||||
-rw-r--r-- | res/values/colors.xml | 2 | ||||
-rw-r--r-- | res/values/dimens.xml | 3 | ||||
-rw-r--r-- | res/values/strings.xml | 4 |
8 files changed, 113 insertions, 0 deletions
diff --git a/res/drawable-xxhdpi/playlist_icon.png b/res/drawable-xxhdpi/playlist_icon.png Binary files differnew file mode 100644 index 0000000..1be226b --- /dev/null +++ b/res/drawable-xxhdpi/playlist_icon.png diff --git a/res/drawable-xxhdpi/stopwatch_icon_white.png b/res/drawable-xxhdpi/stopwatch_icon_white.png Binary files differnew file mode 100644 index 0000000..2f4059a --- /dev/null +++ b/res/drawable-xxhdpi/stopwatch_icon_white.png diff --git a/res/layout/faux_playlist_header.xml b/res/layout/faux_playlist_header.xml new file mode 100644 index 0000000..59ab140 --- /dev/null +++ b/res/layout/faux_playlist_header.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2012 Andrew Neal + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" > + + <include + layout="@layout/playlist_detail_header" + android:visibility="invisible" /> + +</FrameLayout>
\ No newline at end of file diff --git a/res/layout/playlist_detail.xml b/res/layout/playlist_detail.xml new file mode 100644 index 0000000..458737e --- /dev/null +++ b/res/layout/playlist_detail.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 Cyanogen, Inc. +--> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <include + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" + layout="@layout/list_base_nopadding" /> + + <include + android:id="@+id/playlist_header" + layout="@layout/playlist_detail_header" /> +</RelativeLayout>
\ No newline at end of file diff --git a/res/layout/playlist_detail_header.xml b/res/layout/playlist_detail_header.xml new file mode 100644 index 0000000..93c2429 --- /dev/null +++ b/res/layout/playlist_detail_header.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Copyright (C) 2014 Cyanogen, Inc. +--> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="@dimen/playlist_detail_header_height"> + + <com.cyngn.eleven.widgets.LayoutSuppressingImageView + android:id="@+id/image" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" + android:contentDescription="@null" + android:scaleType="centerCrop" /> + + <FrameLayout + android:layout_width="fill_parent" + android:layout_height="@dimen/playlist_detail_header_bottom_height" + android:layout_alignParentBottom="true" + android:background="@color/header_shadow_color"> + + <LinearLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:gravity="center_vertical" + android:orientation="horizontal"> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:scaleType="centerInside" + android:src="@drawable/playlist_icon" /> + + <TextView + android:id="@+id/number_of_songs_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-light" + android:paddingRight="16dp" + android:textColor="@color/white" + android:textSize="@dimen/text_size_micro" /> + + <ImageView + android:layout_width="20dp" + android:layout_height="20dp" + android:scaleType="centerInside" + android:src="@drawable/stopwatch_icon_white" /> + + <TextView + android:id="@+id/duration_text" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="sans-serif-light" + android:textColor="@color/white" + android:textSize="@dimen/text_size_micro" /> + </LinearLayout> + </FrameLayout> +</RelativeLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index 62579cb..1cc9430 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -66,6 +66,8 @@ <color name="header_action_bar_text_color">@color/white</color> <color name="bottom_action_bar_text_color">@color/default_text_color_light</color> + <!-- Color for background for shadow on playlist page --> + <color name="header_shadow_color">#ea31353f</color> <!-- Color for the pop up menu --> <color name="menu_divider_color">#4ca19d9e</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 6437a23..7fd95f0 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -94,6 +94,9 @@ <dimen name="profile_carousel_label_height">45.0dip</dimen> <dimen name="profile_indicator_height">5.0dip</dimen> <dimen name="profile_label_padding">16.0dip</dimen> + <!-- playlist detail header --> + <dimen name="playlist_detail_header_height">240.0dip</dimen> + <dimen name="playlist_detail_header_bottom_height">40.0dip</dimen> <!-- Audio player Buttons (play/pause/shuffle/repeat/next/previous)--> <dimen name="audio_player_controls_end_button_width">30.0dip</dimen> diff --git a/res/values/strings.xml b/res/values/strings.xml index ec7e719..84ac14c 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -202,4 +202,8 @@ <string name="header_5_plus_albums">5+ Albums</string> <string name="combine_two_strings">%1$s | %2$s</string> + + <string name="duration_mins"><xliff:g id="format">%3$dm %4$ds</xliff:g></string> + <string name="duration_hours"><xliff:g id="format">%2$dh %3$dm %4$ds</xliff:g></string> + <string name="duration_days"><xliff:g id="format">%1$dd %2$dd %3$dm %4$ds</xliff:g></string> </resources> |