diff --git a/MusicApp/MusicApp.csproj b/MusicApp/MusicApp.csproj index c024d2e..a9bb4ac 100644 --- a/MusicApp/MusicApp.csproj +++ b/MusicApp/MusicApp.csproj @@ -611,6 +611,15 @@ + + + + + + + + + diff --git a/MusicApp/Resources/Portable Class/Home.cs b/MusicApp/Resources/Portable Class/Home.cs index d453c88..0d4d710 100644 --- a/MusicApp/Resources/Portable Class/Home.cs +++ b/MusicApp/Resources/Portable Class/Home.cs @@ -304,7 +304,7 @@ namespace MusicApp.Resources.Portable_Class MainActivity.instance.HideTabs(); MainActivity.instance.HomeDetails = true; - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(section.data, item.GetName(), false), true); + MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(section.data, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); } } else @@ -325,7 +325,7 @@ namespace MusicApp.Resources.Portable_Class MainActivity.instance.HideTabs(); MainActivity.instance.HomeDetails = true; - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false), true); + MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); } } } diff --git a/MusicApp/Resources/Portable Class/Playlist.cs b/MusicApp/Resources/Portable Class/Playlist.cs index 363ddc1..cc92825 100644 --- a/MusicApp/Resources/Portable Class/Playlist.cs +++ b/MusicApp/Resources/Portable Class/Playlist.cs @@ -148,7 +148,7 @@ namespace MusicApp.Resources.Portable_Class { Google.Apis.YouTube.v3.Data.Playlist playlist = response.Items[i]; YtPlaylists.Add(playlist); - Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.Default__.Url, playlist.Id, -1, -1, playlist.Id, true, true); + Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.High.Url, playlist.Id, -1, -1, playlist.Id, true, true, (int)playlist.ContentDetails.ItemCount); ytPlaylists.Add(song); } @@ -182,7 +182,7 @@ namespace MusicApp.Resources.Portable_Class Google.Apis.YouTube.v3.Data.Playlist playlist = plResponse.Items[0]; playlist.Kind = "youtube#saved"; YtPlaylists.Add(playlist); - Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.Default__.Url, playlist.Id, -1, -1, playlist.Id, true, false); + Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.High.Url, playlist.Id, -1, -1, playlist.Id, true, false, (int)playlist.ContentDetails.ItemCount); ytPlaylists.Add(song); forkedFound = true; } @@ -285,7 +285,7 @@ namespace MusicApp.Resources.Portable_Class if (local) MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(playlist.GetID(), playlist.GetName()), true); else - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(playlist.youtubeID, playlist.GetName(), playlist.isParsed), true); + MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(playlist.youtubeID, playlist.GetName(), playlist.isParsed, playlist.GetArtist(), playlist.queueSlot, playlist.GetAlbum()), true); } private void ListView_ItemLongClick(object sender, int position) diff --git a/MusicApp/Resources/Portable Class/PlaylistTracks.cs b/MusicApp/Resources/Portable Class/PlaylistTracks.cs index 3aefae7..3ffecaf 100644 --- a/MusicApp/Resources/Portable Class/PlaylistTracks.cs +++ b/MusicApp/Resources/Portable Class/PlaylistTracks.cs @@ -1,5 +1,6 @@ using Android.Content; using Android.Database; +using Android.Graphics; using Android.Net; using Android.OS; using Android.Provider; @@ -8,14 +9,18 @@ using Android.Support.V4.App; using Android.Support.V7.App; using Android.Views; using Android.Widget; +using Google.Apis.YouTube.v3; +using Google.Apis.YouTube.v3.Data; using MusicApp.Resources.values; +using Square.Picasso; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using static Android.Provider.MediaStore.Audio; namespace MusicApp.Resources.Portable_Class { - public class PlaylistTracks : ListFragment + public class PlaylistTracks : ListFragment, PopupMenu.IOnMenuItemClickListener { public static PlaylistTracks instance; public string playlistName; @@ -24,6 +29,9 @@ namespace MusicApp.Resources.Portable_Class public List result; public long playlistId = 0; public string ytID = ""; + private string author; + private int count; + private Uri thumnailURI; private bool hasWriteAcess; private string nextPageToken = null; public bool isEmpty = false; @@ -46,11 +54,134 @@ namespace MusicApp.Resources.Portable_Class MainActivity.instance.contentRefresh.Refresh += OnRefresh; MainActivity.instance.OnPaddingChanged += OnPaddingChanged; MainActivity.instance.DisplaySearch(1); - Activity.FindViewById(Resource.Id.playlistHeader).Visibility = ViewStates.Visible; - ((AppBarLayout.LayoutParams)Activity.FindViewById(Resource.Id.collapsingToolbar).LayoutParameters).ScrollFlags = AppBarLayout.LayoutParams.ScrollFlagScroll | AppBarLayout.LayoutParams.ScrollFlagEnterAlwaysCollapsed; #pragma warning disable CS4014 PopulateList(); + + + Activity.FindViewById(Resource.Id.playlistHeader).Visibility = ViewStates.Visible; + ((AppBarLayout.LayoutParams)Activity.FindViewById(Resource.Id.collapsingToolbar).LayoutParameters).ScrollFlags = AppBarLayout.LayoutParams.ScrollFlagScroll | AppBarLayout.LayoutParams.ScrollFlagExitUntilCollapsed; + Activity.FindViewById(Resource.Id.headerTitle).Text = playlistName; + Activity.FindViewById(Resource.Id.headerPlay).Click += (sender, e0) => { PlayInOrder(0); }; + Activity.FindViewById(Resource.Id.headerShuffle).Click += (sender, e0) => + { + if (playlistId != 0) + Playlist.RandomPlay(playlistId, Activity); + else + YoutubeEngine.RandomPlay(ytID); + }; + Activity.FindViewById(Resource.Id.headerMore).Click += (sender, e0) => + { + PopupMenu menu = new PopupMenu(Activity, Activity.FindViewById(Resource.Id.headerMore)); + if(playlistId == 0 && hasWriteAcess) + menu.Inflate(Resource.Menu.ytplaylist_header_more); + else if(playlistId == 0) + menu.Inflate(Resource.Menu.ytplaylistnowrite_header_more); + else + menu.Inflate(Resource.Menu.playlist_header_more) + menu.SetOnMenuItemClickListener(this); + menu.Show(); + }; + + + if (playlistId != 0) + { + Activity.FindViewById(Resource.Id.headerAuthor).Text = MainActivity.account == null ? "by me" : "by " + MainActivity.account.DisplayName; + } + else if(ytID != null && ytID != "") + { + Activity.FindViewById(Resource.Id.headerAuthor).Text = author; + Activity.FindViewById(Resource.Id.headerNumber).Text = count.ToString() + " songs"; + if(count == -1) + Activity.FindViewById(Resource.Id.headerNumber).Text = "NaN songs"; + + Picasso.With(Android.App.Application.Context).Load(thumnailURI).Placeholder(Resource.Drawable.noAlbum).Resize(1080, 1080).CenterCrop().Into(Activity.FindViewById(Resource.Id.headerArt)); + } + } + + public bool OnMenuItemClick(IMenuItem item) + { + switch (item.ItemId) + { + case Resource.Id.download: + YoutubeEngine.DownloadPlaylist(playlistName, ytID); + break; + case Resource.Id.rename: + AlertDialog.Builder builder = new AlertDialog.Builder(Activity, MainActivity.dialogTheme); + builder.SetTitle("Playlist name"); + View view = LayoutInflater.Inflate(Resource.Layout.CreatePlaylistDialog, null); + builder.SetView(view); + builder.SetNegativeButton("Cancel", (senderAlert, args) => { }); + builder.SetPositiveButton("Rename", (senderAlert, args) => + { + Rename(view.FindViewById(Resource.Id.playlistName).Text); + }); + builder.Show(); + break; + case Resource.Id.delete: + Delete(); + break; + } + return true; + } + + async void Rename(string newName) + { + if(playlistId == 0) + { + Google.Apis.YouTube.v3.Data.Playlist playlist = new Google.Apis.YouTube.v3.Data.Playlist + { + Snippet = new PlaylistSnippet() + }; + playlist.Snippet.Title = newName; + playlist.Id = ytID; + + await YoutubeEngine.youtubeService.Playlists.Update(playlist, "snippet").ExecuteAsync(); + } + else + { + ContentValues value = new ContentValues(); + value.Put(Playlists.InterfaceConsts.Name, newName); + Activity.ContentResolver.Update(Playlists.ExternalContentUri, value, Playlists.InterfaceConsts.Id + "=?", new string[] { playlistId.ToString() }); + } + + playlistName = newName; + Activity.FindViewById(Resource.Id.headerTitle).Text = playlistName; + } + + async void Delete() + { + if(playlistId == 0) + { + if (hasWriteAcess) + { + PlaylistsResource.DeleteRequest deleteRequest = YoutubeEngine.youtubeService.Playlists.Delete(ytID); + await deleteRequest.ExecuteAsync(); + } + else + { + ChannelSectionsResource.ListRequest forkedRequest = YoutubeEngine.youtubeService.ChannelSections.List("snippet,contentDetails"); + forkedRequest.Mine = true; + ChannelSectionListResponse forkedResponse = await forkedRequest.ExecuteAsync(); + + foreach (ChannelSection section in forkedResponse.Items) + { + if (section.Snippet.Title == "Saved Playlists") + { + section.ContentDetails.Playlists.Remove(ytID); + ChannelSectionsResource.UpdateRequest request = YoutubeEngine.youtubeService.ChannelSections.Update(section, "snippet,contentDetails"); + ChannelSection response = await request.ExecuteAsync(); + } + } + } + } + else + { + ContentResolver resolver = Activity.ContentResolver; + Uri uri = Playlists.ExternalContentUri; + resolver.Delete(Playlists.ExternalContentUri, Playlists.InterfaceConsts.Id + "=?", new string[] { playlistId.ToString() }); + } + MainActivity.instance.SupportFragmentManager.PopBackStack(); } private void ListView_ScrollStateChanged(object sender, AbsListView.ScrollStateChangedEventArgs e) @@ -95,12 +226,15 @@ namespace MusicApp.Resources.Portable_Class return instance; } - public static Fragment NewInstance(string ytID, string playlistName, bool hasWriteAcess) + public static Fragment NewInstance(string ytID, string playlistName, bool hasWriteAcess, string author, int count, string thumbnailURI) { instance = new PlaylistTracks { Arguments = new Bundle() }; instance.ytID = ytID; instance.hasWriteAcess = hasWriteAcess; instance.playlistName = playlistName; + instance.author = author; + instance.count = count; + instance.thumnailURI = Uri.Parse(thumbnailURI); return instance; } @@ -162,6 +296,12 @@ namespace MusicApp.Resources.Portable_Class isEmpty = true; Activity.AddContentView(emptyView, View.LayoutParameters); } + + Activity.FindViewById(Resource.Id.headerNumber).Text = tracks.Count.ToString() + " songs"; + var songCover = Uri.Parse("content://media/external/audio/albumart"); + var songAlbumArtUri = ContentUris.WithAppendedId(songCover, tracks[0].GetAlbumArt()); + + Picasso.With(Android.App.Application.Context).Load(songAlbumArtUri).Placeholder(Resource.Drawable.noAlbum).Resize(1080, 1080).CenterCrop().Into(Activity.FindViewById(Resource.Id.headerArt)); } else if (ytID != null) { @@ -251,34 +391,9 @@ namespace MusicApp.Resources.Portable_Class ListAdapter = adapter; } - private async void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) + private void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { - List songs = tracks.GetRange(e.Position, tracks.Count - e.Position); - if (result != null && result.Count - 1 >= e.Position) - songs = result.GetRange(e.Position, result.Count - e.Position); - - if (MusicPlayer.isRunning) - MusicPlayer.queue.Clear(); - - if (!songs[0].IsYt) - { - Browse.act = Activity; - Browse.Play(songs[0]); - } - else - YoutubeEngine.Play(songs[0].youtubeID, songs[0].GetName(), songs[0].GetArtist(), songs[0].GetAlbum()); - - songs.RemoveAt(0); - songs.Reverse(); - - while (MusicPlayer.instance == null) - await Task.Delay(10); - - foreach (Song song in songs) - { - MusicPlayer.instance.AddToQueue(song); - } - Player.instance?.UpdateNext(); + PlayInOrder(e.Position); } private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e) @@ -309,38 +424,13 @@ namespace MusicApp.Resources.Portable_Class builder.SetTitle("Pick an action"); if (hasWriteAcess && ytID != "") { - builder.SetItems(action.ToArray(), async (senderAlert, args) => + builder.SetItems(action.ToArray(), (senderAlert, args) => { switch (args.Which) { case 0: int Position = tracks.IndexOf(item); - List songs = tracks.GetRange(Position + 1, tracks.Count - Position - 1); - if (result != null && result.Count - 1 >= Position) - songs = result.GetRange(Position + 1, result.Count - Position - 1); - - if (MusicPlayer.isRunning) - MusicPlayer.queue.Clear(); - - if (!songs[0].IsYt) - { - Browse.act = Activity; - Browse.Play(songs[0]); - } - else - YoutubeEngine.Play(songs[0].youtubeID, songs[0].GetName(), songs[0].GetArtist(), songs[0].GetAlbum()); - - songs.RemoveAt(0); - songs.Reverse(); - - while (MusicPlayer.instance == null) - await Task.Delay(10); - - foreach (Song song in songs) - { - MusicPlayer.instance.AddToQueue(song); - } - Player.instance?.UpdateNext(); + PlayInOrder(Position); break; case 1: @@ -390,38 +480,13 @@ namespace MusicApp.Resources.Portable_Class else { action.Remove("Remove Track from playlist"); - builder.SetItems(action.ToArray(), async (senderAlert, args) => + builder.SetItems(action.ToArray(), (senderAlert, args) => { switch (args.Which) { case 0: int Position = tracks.IndexOf(item); - List songs = tracks.GetRange(Position + 1, tracks.Count - Position - 1); - if (result != null && result.Count - 1 >= Position) - songs = result.GetRange(Position + 1, result.Count - Position - 1); - - if (MusicPlayer.isRunning) - MusicPlayer.queue.Clear(); - - if (!songs[0].IsYt) - { - Browse.act = Activity; - Browse.Play(songs[0]); - } - else - YoutubeEngine.Play(songs[0].youtubeID, songs[0].GetName(), songs[0].GetArtist(), songs[0].GetAlbum()); - - songs.RemoveAt(0); - songs.Reverse(); - - while (MusicPlayer.instance == null) - await Task.Delay(10); - - foreach (Song song in songs) - { - MusicPlayer.instance.AddToQueue(song); - } - Player.instance?.UpdateNext(); + PlayInOrder(Position); break; case 1: @@ -457,6 +522,36 @@ namespace MusicApp.Resources.Portable_Class builder.Show(); } + async void PlayInOrder(int fromPosition) + { + List songs = tracks.GetRange(fromPosition, tracks.Count - fromPosition); + if (result != null && result.Count - 1 >= fromPosition) + songs = result.GetRange(fromPosition, result.Count - fromPosition); + + if (MusicPlayer.isRunning) + MusicPlayer.queue.Clear(); + + if (!songs[0].IsYt) + { + Browse.act = Activity; + Browse.Play(songs[0]); + } + else + YoutubeEngine.Play(songs[0].youtubeID, songs[0].GetName(), songs[0].GetArtist(), songs[0].GetAlbum()); + + songs.RemoveAt(0); + songs.Reverse(); + + while (MusicPlayer.instance == null) + await Task.Delay(10); + + foreach (Song song in songs) + { + MusicPlayer.instance.AddToQueue(song); + } + Player.instance?.UpdateNext(); + } + private void RemoveFromYtPlaylist(Song item, string ytTrackID) { tracks.Remove(item); diff --git a/MusicApp/Resources/Portable Class/Preferences.cs b/MusicApp/Resources/Portable Class/Preferences.cs index 509872e..367f538 100644 --- a/MusicApp/Resources/Portable Class/Preferences.cs +++ b/MusicApp/Resources/Portable Class/Preferences.cs @@ -176,7 +176,6 @@ namespace MusicApp.Resources.Portable_Class public void SignedIn() { - System.Console.WriteLine("&Preference sign in callback"); AccountPreference accountPreference = (AccountPreference)PreferenceScreen.FindPreference("account"); accountPreference.Title = "Logged in as:"; accountPreference.Summary = MainActivity.account.DisplayName; diff --git a/MusicApp/Resources/Portable Class/YoutubeEngine.cs b/MusicApp/Resources/Portable Class/YoutubeEngine.cs index 9fad202..4a9367d 100644 --- a/MusicApp/Resources/Portable Class/YoutubeEngine.cs +++ b/MusicApp/Resources/Portable Class/YoutubeEngine.cs @@ -137,7 +137,7 @@ namespace MusicApp.Resources.Portable_Class await MainActivity.instance.WaitForYoutube(); SearchResource.ListRequest searchResult = youtubeService.Search.List("snippet"); - searchResult.Fields = "items(id/videoId,id/playlistId,id/kind,snippet/title,snippet/thumbnails/default/url,snippet/channelTitle)"; + searchResult.Fields = "items(id/videoId,id/playlistId,id/kind,snippet/title,snippet/thumbnails/high/url,snippet/channelTitle)"; searchResult.Q = search.Replace(" ", "+-"); searchResult.Type = "video"; switch (querryType) @@ -166,7 +166,7 @@ namespace MusicApp.Resources.Portable_Class foreach (var video in searchReponse.Items) { - Song videoInfo = new Song(video.Snippet.Title, video.Snippet.ChannelTitle, video.Snippet.Thumbnails.Default__.Url, video.Id.VideoId ?? video.Id.PlaylistId, -1, -1, video.Id.VideoId ?? video.Id.PlaylistId, true); + Song videoInfo = new Song(video.Snippet.Title, video.Snippet.ChannelTitle, video.Snippet.Thumbnails.High.Url, video.Id.VideoId ?? video.Id.PlaylistId, -1, -1, video.Id.VideoId ?? video.Id.PlaylistId, true); YtKind kind = YtKind.Null; switch (video.Id.Kind) @@ -256,7 +256,7 @@ namespace MusicApp.Resources.Portable_Class instances = null; MainActivity.youtubeParcel = ListView.GetLayoutManager().OnSaveInstanceState(); MainActivity.youtubeInstanceSave = "YoutubeEngine" + "-" + querryType; - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false), true); + MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); break; case YtKind.Channel: Toast.MakeText(Activity, "Action comming soon", ToastLength.Short).Show(); diff --git a/MusicApp/Resources/Resource.Designer.cs b/MusicApp/Resources/Resource.Designer.cs index 03b993b..a6bb768 100644 --- a/MusicApp/Resources/Resource.Designer.cs +++ b/MusicApp/Resources/Resource.Designer.cs @@ -3088,8 +3088,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0051 public const int META = 2131361873; - // aapt resource value: 0x7f0a0110 - public const int PreferenceScreen = 2131362064; + // aapt resource value: 0x7f0a0112 + public const int PreferenceScreen = 2131362066; // aapt resource value: 0x7f0a0052 public const int SHIFT = 2131361874; @@ -3097,8 +3097,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0053 public const int SYM = 2131361875; - // aapt resource value: 0x7f0a0111 - public const int accountPreference = 2131362065; + // aapt resource value: 0x7f0a0113 + public const int accountPreference = 2131362067; // aapt resource value: 0x7f0a00e2 public const int action0 = 2131362018; @@ -3208,8 +3208,8 @@ namespace MusicApp // aapt resource value: 0x7f0a00dc public const int bottomView = 2131362012; - // aapt resource value: 0x7f0a012e - public const int browseLayout = 2131362094; + // aapt resource value: 0x7f0a0130 + public const int browseLayout = 2131362096; // aapt resource value: 0x7f0a00ae public const int browseList = 2131361966; @@ -3223,8 +3223,8 @@ namespace MusicApp // aapt resource value: 0x7f0a00e3 public const int cancel_action = 2131362019; - // aapt resource value: 0x7f0a011a - public const int cardPlayer = 2131362074; + // aapt resource value: 0x7f0a011c + public const int cardPlayer = 2131362076; // aapt resource value: 0x7f0a0060 public const int center = 2131361888; @@ -3286,6 +3286,9 @@ namespace MusicApp // aapt resource value: 0x7f0a0082 public const int default_activity_button = 2131361922; + // aapt resource value: 0x7f0a0135 + public const int delete = 2131362101; + // aapt resource value: 0x7f0a00b9 public const int design_bottom_sheet = 2131361977; @@ -3307,11 +3310,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0103 public const int downFAB = 2131362051; - // aapt resource value: 0x7f0a0130 - public const int downloadMDfromYT = 2131362096; + // aapt resource value: 0x7f0a013a + public const int download = 2131362106; - // aapt resource value: 0x7f0a0126 - public const int edit = 2131362086; + // aapt resource value: 0x7f0a0132 + public const int downloadMDfromYT = 2131362098; + + // aapt resource value: 0x7f0a0128 + public const int edit = 2131362088; // aapt resource value: 0x7f0a00a0 public const int edit_query = 2131361952; @@ -3415,8 +3421,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0063 public const int fill_vertical = 2131361891; - // aapt resource value: 0x7f0a0134 - public const int filter = 2131362100; + // aapt resource value: 0x7f0a0138 + public const int filter = 2131362104; // aapt resource value: 0x7f0a0076 public const int fit = 2131361910; @@ -3445,20 +3451,26 @@ namespace MusicApp // aapt resource value: 0x7f0a000a public const int ghost_view = 2131361802; - // aapt resource value: 0x7f0a0108 - public const int headerMore = 2131362056; - - // aapt resource value: 0x7f0a0105 - public const int headerNumber = 2131362053; + // aapt resource value: 0x7f0a0104 + public const int headerArt = 2131362052; // aapt resource value: 0x7f0a0106 - public const int headerPlay = 2131362054; + public const int headerAuthor = 2131362054; + + // aapt resource value: 0x7f0a010a + public const int headerMore = 2131362058; // aapt resource value: 0x7f0a0107 - public const int headerShuffle = 2131362055; + public const int headerNumber = 2131362055; - // aapt resource value: 0x7f0a0104 - public const int headerTitle = 2131362052; + // aapt resource value: 0x7f0a0108 + public const int headerPlay = 2131362056; + + // aapt resource value: 0x7f0a0109 + public const int headerShuffle = 2131362057; + + // aapt resource value: 0x7f0a0105 + public const int headerTitle = 2131362053; // aapt resource value: 0x7f0a0005 public const int home = 2131361797; @@ -3469,8 +3481,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0084 public const int icon = 2131361924; - // aapt resource value: 0x7f0a0109 - public const int icon_frame = 2131362057; + // aapt resource value: 0x7f0a010b + public const int icon_frame = 2131362059; // aapt resource value: 0x7f0a00f0 public const int icon_group = 2131362032; @@ -3511,14 +3523,14 @@ namespace MusicApp // aapt resource value: 0x7f0a0017 public const int line1 = 2131361815; - // aapt resource value: 0x7f0a012a - public const int line2 = 2131362090; + // aapt resource value: 0x7f0a012c + public const int line2 = 2131362092; // aapt resource value: 0x7f0a0018 public const int line3 = 2131361816; - // aapt resource value: 0x7f0a010b - public const int list = 2131362059; + // aapt resource value: 0x7f0a010d + public const int list = 2131362061; // aapt resource value: 0x7f0a003a public const int listMode = 2131361850; @@ -3526,23 +3538,23 @@ namespace MusicApp // aapt resource value: 0x7f0a0083 public const int list_item = 2131361923; - // aapt resource value: 0x7f0a0113 - public const int localPlay = 2131362067; + // aapt resource value: 0x7f0a0115 + public const int localPlay = 2131362069; // aapt resource value: 0x7f0a00d4 public const int logButton = 2131362004; - // aapt resource value: 0x7f0a012c - public const int masked = 2131362092; + // aapt resource value: 0x7f0a012e + public const int masked = 2131362094; - // aapt resource value: 0x7f0a0119 - public const int maxValue = 2131362073; + // aapt resource value: 0x7f0a011b + public const int maxValue = 2131362075; // aapt resource value: 0x7f0a00e5 public const int media_actions = 2131362021; - // aapt resource value: 0x7f0a0129 - public const int message = 2131362089; + // aapt resource value: 0x7f0a012b + public const int message = 2131362091; // aapt resource value: 0x7f0a00c8 public const int metadataAlbum = 2131361992; @@ -3568,20 +3580,20 @@ namespace MusicApp // aapt resource value: 0x7f0a004d public const int middle = 2131361869; - // aapt resource value: 0x7f0a0118 - public const int minValue = 2131362072; + // aapt resource value: 0x7f0a011a + public const int minValue = 2131362074; // aapt resource value: 0x7f0a006e public const int mini = 2131361902; - // aapt resource value: 0x7f0a0127 - public const int moreButton = 2131362087; + // aapt resource value: 0x7f0a0129 + public const int moreButton = 2131362089; // aapt resource value: 0x7f0a0044 public const int multiply = 2131361860; - // aapt resource value: 0x7f0a012d - public const int musicLayout = 2131362093; + // aapt resource value: 0x7f0a012f + public const int musicLayout = 2131362095; // aapt resource value: 0x7f0a00bc public const int navigation_header_container = 2131361980; @@ -3625,8 +3637,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0075 public const int one = 2131361909; - // aapt resource value: 0x7f0a0128 - public const int pager = 2131362088; + // aapt resource value: 0x7f0a012a + public const int pager = 2131362090; // aapt resource value: 0x7f0a0067 public const int parallax = 2131361895; @@ -3667,17 +3679,17 @@ namespace MusicApp // aapt resource value: 0x7f0a00d6 public const int playlistHeader = 2131362006; - // aapt resource value: 0x7f0a012f - public const int playlistLayout = 2131362095; + // aapt resource value: 0x7f0a0131 + public const int playlistLayout = 2131362097; // aapt resource value: 0x7f0a00b3 public const int playlistName = 2131361971; - // aapt resource value: 0x7f0a0116 - public const int playlistURL = 2131362070; + // aapt resource value: 0x7f0a0118 + public const int playlistURL = 2131362072; - // aapt resource value: 0x7f0a010f - public const int preferenceContent = 2131362063; + // aapt resource value: 0x7f0a0111 + public const int preferenceContent = 2131362065; // aapt resource value: 0x7f0a0006 public const int progress_circular = 2131361798; @@ -3685,11 +3697,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0007 public const int progress_horizontal = 2131361799; - // aapt resource value: 0x7f0a0115 - public const int quickPlay = 2131362069; + // aapt resource value: 0x7f0a0117 + public const int quickPlay = 2131362071; - // aapt resource value: 0x7f0a0112 - public const int quickPlayLinear = 2131362066; + // aapt resource value: 0x7f0a0114 + public const int quickPlayLinear = 2131362068; // aapt resource value: 0x7f0a0097 public const int radio = 2131361943; @@ -3697,11 +3709,14 @@ namespace MusicApp // aapt resource value: 0x7f0a00d3 public const int recycler = 2131362003; - // aapt resource value: 0x7f0a0123 - public const int reorder = 2131362083; + // aapt resource value: 0x7f0a0134 + public const int rename = 2131362100; - // aapt resource value: 0x7f0a0133 - public const int repeat = 2131362099; + // aapt resource value: 0x7f0a0125 + public const int reorder = 2131362085; + + // aapt resource value: 0x7f0a0137 + public const int repeat = 2131362103; // aapt resource value: 0x7f0a0065 public const int right = 2131361893; @@ -3739,8 +3754,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0070 public const int scrollable = 2131361904; - // aapt resource value: 0x7f0a0117 - public const int search = 2131362071; + // aapt resource value: 0x7f0a0119 + public const int search = 2131362073; // aapt resource value: 0x7f0a00a2 public const int search_badge = 2131361954; @@ -3772,17 +3787,17 @@ namespace MusicApp // aapt resource value: 0x7f0a00ab public const int search_voice_btn = 2131361963; - // aapt resource value: 0x7f0a010c - public const int seekbar = 2131362060; + // aapt resource value: 0x7f0a010e + public const int seekbar = 2131362062; - // aapt resource value: 0x7f0a010d - public const int seekbar_value = 2131362061; + // aapt resource value: 0x7f0a010f + public const int seekbar_value = 2131362063; // aapt resource value: 0x7f0a00ac public const int select_dialog_listview = 2131361964; - // aapt resource value: 0x7f0a0135 - public const int settings = 2131362101; + // aapt resource value: 0x7f0a0139 + public const int settings = 2131362105; // aapt resource value: 0x7f0a0096 public const int shortcut = 2131361942; @@ -3799,8 +3814,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0041 public const int showTitle = 2131361857; - // aapt resource value: 0x7f0a0132 - public const int shuffle = 2131362098; + // aapt resource value: 0x7f0a0136 + public const int shuffle = 2131362102; // aapt resource value: 0x7f0a00b4 public const int smallLabel = 2131361972; @@ -3823,35 +3838,35 @@ namespace MusicApp // aapt resource value: 0x7f0a0102 public const int songTimer = 2131362050; - // aapt resource value: 0x7f0a011c - public const int spArt = 2131362076; - // aapt resource value: 0x7f0a011e - public const int spArtist = 2131362078; - - // aapt resource value: 0x7f0a011b - public const int spContainer = 2131362075; - - // aapt resource value: 0x7f0a0121 - public const int spLast = 2131362081; - - // aapt resource value: 0x7f0a011f - public const int spNext = 2131362079; + public const int spArt = 2131362078; // aapt resource value: 0x7f0a0120 - public const int spPlay = 2131362080; - - // aapt resource value: 0x7f0a0122 - public const int spProgress = 2131362082; + public const int spArtist = 2131362080; // aapt resource value: 0x7f0a011d - public const int spTitle = 2131362077; + public const int spContainer = 2131362077; + + // aapt resource value: 0x7f0a0123 + public const int spLast = 2131362083; + + // aapt resource value: 0x7f0a0121 + public const int spNext = 2131362081; + + // aapt resource value: 0x7f0a0122 + public const int spPlay = 2131362082; + + // aapt resource value: 0x7f0a0124 + public const int spProgress = 2131362084; + + // aapt resource value: 0x7f0a011f + public const int spTitle = 2131362079; // aapt resource value: 0x7f0a0086 public const int spacer = 2131361926; - // aapt resource value: 0x7f0a010a - public const int spinner = 2131362058; + // aapt resource value: 0x7f0a010c + public const int spinner = 2131362060; // aapt resource value: 0x7f0a0008 public const int split_action_bar = 2131361800; @@ -3871,8 +3886,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0066 public const int start = 2131361894; - // aapt resource value: 0x7f0a0124 - public const int status = 2131362084; + // aapt resource value: 0x7f0a0126 + public const int status = 2131362086; // aapt resource value: 0x7f0a00e4 public const int status_bar_latest_event_content = 2131362020; @@ -3886,8 +3901,8 @@ namespace MusicApp // aapt resource value: 0x7f0a007a public const int surface_view = 2131361914; - // aapt resource value: 0x7f0a010e - public const int switchWidget = 2131362062; + // aapt resource value: 0x7f0a0110 + public const int switchWidget = 2131362064; // aapt resource value: 0x7f0a003c public const int tabMode = 2131361852; @@ -3967,8 +3982,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0013 public const int transition_transform = 2131361811; - // aapt resource value: 0x7f0a0131 - public const int undoChange = 2131362097; + // aapt resource value: 0x7f0a0133 + public const int undoChange = 2131362099; // aapt resource value: 0x7f0a0049 public const int uniform = 2131361865; @@ -3982,8 +3997,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0016 public const int view_offset_helper = 2131361814; - // aapt resource value: 0x7f0a012b - public const int visible = 2131362091; + // aapt resource value: 0x7f0a012d + public const int visible = 2131362093; // aapt resource value: 0x7f0a0036 public const int wide = 2131361846; @@ -3994,11 +4009,11 @@ namespace MusicApp // aapt resource value: 0x7f0a004a public const int wrap_content = 2131361866; - // aapt resource value: 0x7f0a0125 - public const int youtubeIcon = 2131362085; + // aapt resource value: 0x7f0a0127 + public const int youtubeIcon = 2131362087; - // aapt resource value: 0x7f0a0114 - public const int ytPlay = 2131362068; + // aapt resource value: 0x7f0a0116 + public const int ytPlay = 2131362070; // aapt resource value: 0x7f0a00d2 public const int ytProgress = 2131362002; @@ -4424,10 +4439,16 @@ namespace MusicApp public const int metaData_items = 2131558401; // aapt resource value: 0x7f0d0002 - public const int QueueItems = 2131558402; + public const int playlist_header_more = 2131558402; // aapt resource value: 0x7f0d0003 - public const int toolbar_menu = 2131558403; + public const int QueueItems = 2131558403; + + // aapt resource value: 0x7f0d0004 + public const int toolbar_menu = 2131558404; + + // aapt resource value: 0x7f0d0005 + public const int ytplaylist_header_more = 2131558405; static Menu() { diff --git a/MusicApp/Resources/layout/PlaylistHeader.xml b/MusicApp/Resources/layout/PlaylistHeader.xml index 9fedd31..5f9ff3b 100644 --- a/MusicApp/Resources/layout/PlaylistHeader.xml +++ b/MusicApp/Resources/layout/PlaylistHeader.xml @@ -8,6 +8,7 @@ android:layout_height="wrap_content" android:layout_width="fill_parent" android:src="@drawable/noAlbum" + android:id="@+id/headerArt" android:scaleType="fitCenter" android:adjustViewBounds="true" /> + + + + \ No newline at end of file diff --git a/MusicApp/Resources/menu/ytplaylist_header_more.xml b/MusicApp/Resources/menu/ytplaylist_header_more.xml new file mode 100644 index 0000000..0a67f2e --- /dev/null +++ b/MusicApp/Resources/menu/ytplaylist_header_more.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/MusicApp/Resources/menu/ytplaylistnowrite_header_more.xml b/MusicApp/Resources/menu/ytplaylistnowrite_header_more.xml new file mode 100644 index 0000000..6131537 --- /dev/null +++ b/MusicApp/Resources/menu/ytplaylistnowrite_header_more.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file