diff options
Diffstat (limited to 'MusicDemo/src/main/res')
-rw-r--r-- | MusicDemo/src/main/res/drawable-xhdpi/ic_equalizer_white_24dp.png | bin | 0 -> 207 bytes | |||
-rw-r--r-- | MusicDemo/src/main/res/drawable-xxhdpi/ic_equalizer_white_24dp.png | bin | 0 -> 265 bytes | |||
-rw-r--r-- | MusicDemo/src/main/res/layout/activity_player.xml | 22 | ||||
-rw-r--r-- | MusicDemo/src/main/res/layout/fragment_list.xml | 60 | ||||
-rw-r--r-- | MusicDemo/src/main/res/layout/list_item.xml | 55 | ||||
-rw-r--r-- | MusicDemo/src/main/res/values-v21/styles.xml | 2 | ||||
-rw-r--r-- | MusicDemo/src/main/res/values/dimens.xml | 19 | ||||
-rw-r--r-- | MusicDemo/src/main/res/values/strings.xml | 5 |
8 files changed, 162 insertions, 1 deletions
diff --git a/MusicDemo/src/main/res/drawable-xhdpi/ic_equalizer_white_24dp.png b/MusicDemo/src/main/res/drawable-xhdpi/ic_equalizer_white_24dp.png Binary files differnew file mode 100644 index 0000000..dbba844 --- /dev/null +++ b/MusicDemo/src/main/res/drawable-xhdpi/ic_equalizer_white_24dp.png diff --git a/MusicDemo/src/main/res/drawable-xxhdpi/ic_equalizer_white_24dp.png b/MusicDemo/src/main/res/drawable-xxhdpi/ic_equalizer_white_24dp.png Binary files differnew file mode 100644 index 0000000..b82a8d9 --- /dev/null +++ b/MusicDemo/src/main/res/drawable-xxhdpi/ic_equalizer_white_24dp.png diff --git a/MusicDemo/src/main/res/layout/activity_player.xml b/MusicDemo/src/main/res/layout/activity_player.xml new file mode 100644 index 0000000..21cdbbd --- /dev/null +++ b/MusicDemo/src/main/res/layout/activity_player.xml @@ -0,0 +1,22 @@ +<!-- + Copyright (C) 2014 The Android Open Source Project + + 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" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/container" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MusicPlayerActivity" + tools:ignore="MergeRootFrame" /> diff --git a/MusicDemo/src/main/res/layout/fragment_list.xml b/MusicDemo/src/main/res/layout/fragment_list.xml new file mode 100644 index 0000000..a40240f --- /dev/null +++ b/MusicDemo/src/main/res/layout/fragment_list.xml @@ -0,0 +1,60 @@ +<!-- + Copyright (C) 2014 The Android Open Source Project + + 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. + --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:padding="16dp"> + + <LinearLayout + android:id="@+id/controls" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal"> + + <ImageButton + android:id="@+id/skip_previous" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:src="@drawable/ic_skip_previous_white_24dp" + android:contentDescription="@string/skip_previous"/> + + <ImageButton + android:id="@+id/play_pause" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:src="@drawable/ic_play_arrow_white_24dp" + android:contentDescription="@string/play_pause"/> + + <ImageButton + android:id="@+id/skip_next" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_weight="1" + android:src="@drawable/ic_skip_next_white_24dp" + android:contentDescription="@string/skip_next"/> + + </LinearLayout> + + <ListView + android:id="@+id/list_view" + android:layout_width="match_parent" + android:layout_height="match_parent"> + </ListView> + +</LinearLayout> diff --git a/MusicDemo/src/main/res/layout/list_item.xml b/MusicDemo/src/main/res/layout/list_item.xml new file mode 100644 index 0000000..729628f --- /dev/null +++ b/MusicDemo/src/main/res/layout/list_item.xml @@ -0,0 +1,55 @@ +<!-- + Copyright (C) 2014 The Android Open Source Project + + 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. + --> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:listPreferredItemHeight" + android:orientation="horizontal"> + + <ImageView + android:id="@+id/play_eq" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:contentDescription="@string/play_item" + android:src="@drawable/ic_play_arrow_white_24dp"/> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:mode="twoLine" + android:padding="4dp" + android:orientation="vertical"> + + <TextView + android:id="@+id/title" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/margin_text_view" + android:layout_marginTop="@dimen/margin_text_view" + android:textAppearance="?android:attr/textAppearanceMedium"/> + + <TextView + android:id="@+id/description" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/margin_text_view" + android:layout_marginTop="@dimen/margin_text_view" + android:textAppearance="?android:attr/textAppearanceSmall"/> + + </LinearLayout> + +</LinearLayout> diff --git a/MusicDemo/src/main/res/values-v21/styles.xml b/MusicDemo/src/main/res/values-v21/styles.xml index 602ce1c..21bb211 100644 --- a/MusicDemo/src/main/res/values-v21/styles.xml +++ b/MusicDemo/src/main/res/values-v21/styles.xml @@ -16,7 +16,7 @@ --> <resources> - <style name="AppBaseTheme" parent="android:Theme.Light"> + <style name="AppBaseTheme" parent="android:Theme.Material"> <!-- colorPrimary is used for Notification icon and bottom facet bar icons and overflow actions --> <item name="android:colorPrimary">#ffff5722</item> diff --git a/MusicDemo/src/main/res/values/dimens.xml b/MusicDemo/src/main/res/values/dimens.xml new file mode 100644 index 0000000..f905809 --- /dev/null +++ b/MusicDemo/src/main/res/values/dimens.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2014 The Android Open Source Project + + 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. + --> +<resources> + <dimen name="margin_text_view">6dip</dimen> +</resources> diff --git a/MusicDemo/src/main/res/values/strings.xml b/MusicDemo/src/main/res/values/strings.xml index 82e07b0..7a012e8 100644 --- a/MusicDemo/src/main/res/values/strings.xml +++ b/MusicDemo/src/main/res/values/strings.xml @@ -24,5 +24,10 @@ <string name="browse_musics_by_genre_subtitle">%1$s songs</string> <string name="random_queue_title">Random music</string> <string name="error_cannot_skip">Cannot skip</string> + <string name="error_loading_media">Error Loading Media</string> + <string name="play_item">Play item</string> + <string name="skip_previous">Skip to previous</string> + <string name="play_pause">play or pause</string> + <string name="skip_next">Skip to next</string> </resources> |