Last added playlist half working. More to come tomorrow.

This commit is contained in:
Karim Abou Zeid 2015-06-21 01:23:27 +02:00
commit 65c879d64e
47 changed files with 1000 additions and 317 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

View file

@ -4,7 +4,6 @@
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:paddingTop="@dimen/list_padding_vertical"
android:paddingBottom="@dimen/bottom_offset_fab_activity"
android:id="@+id/recycler_view"
android:layout_width="match_parent"

View file

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/smart_playlist_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingBottom="@dimen/bottom_offset_fab_activity"
android:scrollbars="none" />
<TextView
android:id="@android:id/empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:fontFamily="sans-serif-light"
android:text="@string/empty"
android:textColor="?android:textColorSecondary"
android:textSize="@dimen/empty_text_size" />
<com.kabouzeid.gramophone.views.FastScroller
android:id="@+id/fast_scroller"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end" />
</FrameLayout>

View file

@ -1,18 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?rect_selector">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?card_color"
android:elevation="2dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp"
tools:ignore="RtlSymmetry">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp"
tools:ignore="RtlSymmetry">
<TextView
android:id="@+id/track_number"

View file

@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:foreground="?rect_selector">
android:background="?card_color"
android:elevation="2dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"

View file

@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:foreground="?rect_selector">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?card_color"
android:elevation="2dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<com.kabouzeid.gramophone.views.WidthFitSquareImageView
android:id="@+id/album_art"

View file

@ -3,7 +3,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="?rect_selector">
android:background="?card_color"
android:elevation="2dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
@ -13,7 +16,6 @@
android:paddingStart="16dp">
<ImageView
android:tint="?themed_drawable_color"
android:id="@+id/playlist_icon"
android:layout_width="40dp"
android:layout_height="40dp"
@ -21,6 +23,7 @@
android:gravity="center"
android:padding="8dp"
android:src="@drawable/ic_queue_music_white_24dp"
android:tint="?themed_drawable_color"
tools:ignore="ContentDescription" />
<TextView
@ -40,8 +43,8 @@
android:id="@+id/menu"
style="@style/OverFlowButton"
android:layout_gravity="center_vertical"
android:layout_marginRight="2dp"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
tools:ignore="ContentDescription" />
</LinearLayout>

View file

@ -3,9 +3,11 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="?card_color"
android:descendantFocusability="blocksDescendants"
android:elevation="2dp"
android:orientation="horizontal"
tools:ignore="ContentDescription">
tools:ignore="UnusedAttribute">
<TextView
android:id="@+id/song_title"
@ -22,8 +24,9 @@
<ImageView
android:id="@+id/playing_indicator"
style="@style/PlayingIndicator"
android:layout_marginEnd="-8dp"
android:layout_marginRight="-8dp"
android:layout_marginEnd="-8dp" />
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/menu"

View file

@ -1,58 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="64dp"
android:descendantFocusability="blocksDescendants"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<com.kabouzeid.gramophone.views.WidthFitSquareImageView
android:id="@+id/image"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:gravity="center"
android:scaleType="centerCrop" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:fontFamily="sans-serif"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?title_text_color" />
<TextView
android:id="@+id/sub_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:fontFamily="sans-serif"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="?caption_text_color" />
</LinearLayout>
<ImageView
android:id="@+id/menu"
style="@style/OverFlowButton"
android:layout_gravity="center_vertical"
android:layout_marginRight="2dp"
android:layout_marginEnd="2dp"
tools:ignore="ContentDescription" />
</LinearLayout>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="64dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingLeft="16dp"
android:paddingStart="16dp">
<ImageView
android:id="@+id/playlist_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:gravity="center"
android:padding="8dp"
android:src="@drawable/ic_queue_music_white_24dp"
android:tint="?themed_drawable_color"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/playlist_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_weight="1"
android:fontFamily="sans-serif"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
android:textColor="?title_text_color" />
<ImageView
android:id="@+id/menu"
style="@style/OverFlowButton"
android:layout_gravity="center_vertical"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
tools:ignore="ContentDescription" />
</LinearLayout>
</FrameLayout>

View file

@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:foreground="?rect_selector">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?card_color"
android:elevation="2dp"
android:foreground="?rect_selector"
tools:ignore="UnusedAttribute">
<LinearLayout
android:layout_width="match_parent"

View file

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_play_next"
android:title="@string/action_play_next"
app:showAsAction="never" />
<item
android:id="@+id/action_add_to_current_playing"
android:title="@string/action_add_to_playing_queue"
app:showAsAction="never" />
<item
android:id="@+id/action_add_to_playlist"
android:title="@string/action_add_to_playlist"
app:showAsAction="never" />
<item
android:id="@+id/action_go_to_album"
android:title="@string/action_go_to_album"
app:showAsAction="never" />
<item
android:id="@+id/action_go_to_artist"
android:title="@string/action_go_to_artist"
app:showAsAction="never" />
<item
android:id="@+id/action_share"
android:title="@string/action_share"
app:showAsAction="never" />
<item
android:id="@+id/action_tag_editor"
android:title="@string/action_tag_editor"
app:showAsAction="never" />
<item
android:id="@+id/action_details"
android:title="@string/action_details"
app:showAsAction="never" />
<item
android:id="@+id/action_set_as_ringtone"
android:title="@string/action_set_as_ringtone"
app:showAsAction="never" />
<item
android:id="@+id/action_delete_from_disk"
android:title="@string/action_delete_from_disk"
app:showAsAction="never" />
</menu>

View file

@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_play"
android:title="@string/action_play" />
<item
android:id="@+id/action_add_to_current_playing"
android:title="@string/action_add_to_playing_queue" />
<item
android:id="@+id/action_rename_playlist"
android:title="@string/rename_playlist_title"/>
android:title="@string/rename_playlist_title" />
<item
android:id="@+id/action_delete_playlist"
android:title="@string/delete_playlist_title"/>
android:title="@string/delete_playlist_title" />
</menu>

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/action_play"
android:title="@string/action_play" />
<item
android:id="@+id/action_add_to_current_playing"
android:title="@string/action_add_to_playing_queue" />
</menu>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_add_to_playlist"
android:icon="@drawable/ic_playlist_add_white_24dp"
android:title="@string/action_add_to_playlist"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_add_to_current_playing"
android:icon="@drawable/ic_queue_white_24dp"
android:title="@string/action_add_to_playing_queue"
app:showAsAction="ifRoom" />
</menu>

View file

@ -9,6 +9,11 @@
android:title="@string/action_currently_playing"
app:showAsAction="ifRoom" />
<item
android:id="@+id/action_clear_playlist"
android:title="@string/action_clear_playlist"
app:showAsAction="never" />
<item
android:id="@+id/action_playing_queue"
android:title="@string/action_playing_queue"

View file

@ -3,4 +3,11 @@
<string name="app_name">Phonograph</string>
<string name="credits_4">\u0020<a href="http://cookicons.co/">Cookicons</a></string>
<string name="credits_2">\u0020<b>Karim Abou Zeid</b>.\n\n<a href="https://plus.google.com/+KarimAbouZeid23697">Google+</a>&#160;&#160;&#160;<a href="https://twitter.com/karim23697">Twitter</a>\n\n</string>
<string name="title_activity_smart_playlist_detail">SmartPlaylistDetailActivity</string>
<string name="title_activity_tag_editor">TagEditorActivity</string>
<string name="title_activity_album_tag_editor">AlbumTagEditorActivity</string>
<string name="title_activity_settings">SettingsActivity</string>
<string name="title_activity_playlist_detail">PlaylistActivity</string>
<string name="title_activity_search">SearchActivity</string>
</resources>

View file

@ -10,9 +10,11 @@
<string name="action_settings">"Settings"</string>
<string name="action_about">About</string>
<string name="action_currently_playing">Currently playing</string>
<string name="action_clear_playlist">Clear playlist</string>
<string name="action_playing_queue">Playing queue</string>
<string name="action_search">Search</string>
<string name="action_play_next">Play next</string>
<string name="action_play">Play</string>
<string name="action_add_to_playing_queue">Add to playing queue</string>
<string name="action_remove_from_playing_queue">Remove from playing queue</string>
<string name="action_add_to_playlist">Add to playlist…</string>
@ -28,7 +30,6 @@
<string name="biography_unavailable">We were not able to find a matching biography for this artist.</string>
<string name="biography">Biography</string>
<string name="audio_focus_denied">No audio focus.</string>
<string name="title_activity_tag_editor">Tag editor</string>
<string name="tag_editor">Tag editor</string>
<string name="album">Album</string>
<string name="artist">Artist</string>
@ -40,7 +41,6 @@
<string name="album_or_artist_empty">The album title or the album artist text field is empty.</string>
<string name="writing_file_number">Writing file</string>
<string name="saving_changes">Saving changes…</string>
<string name="title_activity_album_tag_editor">Album Tag Editor</string>
<string name="label_details">Details</string>
<string name="label_file_name">File name</string>
<string name="label_file_path">File path</string>
@ -55,13 +55,11 @@
<string name="save_as_playlist">Save as playlist</string>
<string name="credits_3">Icon by</string>
<string name="credits_1">"Phonograph is a completely free material designed music player by"</string>
<string name="title_activity_search">Search</string>
<string name="no_results">No results</string>
<string name="action_re_download_artist_image">Update artist image</string>
<string name="updating">Updating…</string>
<string name="added_title_to_playing_queue">"Added 1 title to the playing queue."</string>
<string name="added_x_titles_to_playing_queue">Added %1$d titles to the playing queue.</string>
<string name="title_activity_playlist_detail">Playlist Activity</string>
<string name="action_remove_from_playlist">Remove from playlist</string>
<string name="new_playlist_action">New playlist…</string>
<string name="action_grid_columns">Grid columns</string>
@ -99,7 +97,6 @@
<string name="pref_summary_colored_navigation_bar">In which views the navigation bar should be colored.</string>
<string name="pref_title_navigation_bar">Colored navigation bar</string>
<string name="pref_title_set_default_start_page">Start page</string>
<string name="title_activity_settings">Settings</string>
<string name="pref_title_colored_navigation_bar_artists">Artist view</string>
<string name="pref_title_colored_navigation_bar_albums">Album view</string>
<string name="pref_title_colored_navigation_bar_current_playing">Playing view</string>
@ -146,15 +143,18 @@
<string name="pref_summary_fade_play_pause">"Fades the song in/out on play/pause."</string>
<string name="pref_summary_gapless_playback">"Eliminates the gap between two songs. Disabling this might fix playback issues."</string>
<string name="pref_summary_force_square_album_art">Album art in the now playing view is forced to be squared.</string>
<string name="pref_summary_opaque_toolbar_now_playing">The toolbar is opaque and do not cover the album art.</string>
<string name="pref_summary_opaque_statusbar_now_playing">The statusbar is opaque and do not cover the album art.</string>
<string name="pref_summary_opaque_toolbar_now_playing">The toolbar is opaque and does not cover the album art.</string>
<string name="pref_summary_opaque_statusbar_now_playing">The statusbar is opaque and does not cover the album art.</string>
<string name="pref_summary_larger_title_box_now_playing">The box below the album art where the song title and artist goes is larger in its height.</string>
<string name="pref_summary_alternative_progress_slider_now_playing">Uses a progressbar which do not cover the album art instead of the normal progress slider.</string>
<string name="pref_summary_alternative_progress_slider_now_playing">Uses a progressbar which does not cover the album art instead of the default progress slider.</string>
<string name="pref_summary_playback_controller_card_now_playing">Displays a card below the playback controller buttons (play/pause etc.).</string>
<string name="failed_download_albumart">"Unable to download the art for this album."</string>
<string name="search_hint">Search your library…</string>
<string name="rescanning_media">Rescanning media…</string>
<string name="other">Other</string>
<string name="favorites">Favorites</string>
<string name="last_added">Last added</string>
<string name="recently_played">Recently played</string>
<string name="my_top_tracks">My top tracks</string>
<string-array name="update_album_cover_options">
<item>Download from Last.fm</item>
<item>Pick from Local Storage</item>