diff --git a/MusicApp/MainActivity.cs b/MusicApp/MainActivity.cs index 133d822..bda4892 100644 --- a/MusicApp/MainActivity.cs +++ b/MusicApp/MainActivity.cs @@ -578,6 +578,28 @@ namespace MusicApp YoutubeEngine.instances = null; } + if(PlaylistTracks.instance != null) + { + HideSearch(); + if (PlaylistTracks.instance.isEmpty) + { + ViewGroup rootView = FindViewById(Android.Resource.Id.Content); + rootView.RemoveView(PlaylistTracks.instance.emptyView); + } + SupportActionBar.SetHomeButtonEnabled(false); + SupportActionBar.SetDisplayHomeAsUpEnabled(false); + SupportActionBar.SetDisplayShowTitleEnabled(true); + SupportActionBar.Title = "MusicApp"; + + contentRefresh.Refresh -= PlaylistTracks.instance.OnRefresh; + OnPaddingChanged -= PlaylistTracks.instance.OnPaddingChanged; + FindViewById(Resource.Id.appbar).RemoveOnOffsetChangedListener(PlaylistTracks.instance); + FindViewById(Resource.Id.playlistHeader).Visibility = ViewStates.Gone; + + SupportFragmentManager.PopBackStack(); + PlaylistTracks.instance = null; + } + Android.Support.V4.App.Fragment fragment = null; switch (layout) { @@ -822,7 +844,6 @@ namespace MusicApp { if (adapter.Count == 2) { - Console.WriteLine("&Removing browse instance"); Browse.instance = null; FolderBrowse.instance = null; } diff --git a/MusicApp/MusicApp.csproj b/MusicApp/MusicApp.csproj index a9bb4ac..51aa547 100644 --- a/MusicApp/MusicApp.csproj +++ b/MusicApp/MusicApp.csproj @@ -257,6 +257,8 @@ + + @@ -620,6 +622,12 @@ + + + + + + diff --git a/MusicApp/Resources/Portable Class/Home.cs b/MusicApp/Resources/Portable Class/Home.cs index 0d4d710..a1a0629 100644 --- a/MusicApp/Resources/Portable Class/Home.cs +++ b/MusicApp/Resources/Portable Class/Home.cs @@ -61,205 +61,219 @@ namespace MusicApp.Resources.Portable_Class return view; } - private async void PopulateSongs() + private /*async*/ void PopulateSongs() { - ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(Activity); - string[] selectedTopicsID = prefManager.GetStringSet("selectedTopicsID", new string[] { }).ToArray(); + HomeSection queue = new HomeSection("Queue", SectionType.SinglePlaylist, MusicPlayer.queue); + if(queue.contentValue.Count > 0) + adapterItems.Add(queue); - if (selectedTopicsID.Length < 1) - return; + Console.WriteLine("&Queue nb: " + MusicPlayer.queue.Count); - if (YoutubeEngine.youtubeService == null) - MainActivity.instance.Login(); + adapter = new HomeAdapter(adapterItems); + ListView.SetAdapter(adapter); + adapter.ItemClick += ListView_ItemClick; + ListView.SetItemAnimator(new DefaultItemAnimator()); + ListView.ScrollChange += MainActivity.instance.Scroll; - await MainActivity.instance.WaitForYoutube(); + #region yt + //ISharedPreferences prefManager = PreferenceManager.GetDefaultSharedPreferences(Activity); + //string[] selectedTopicsID = prefManager.GetStringSet("selectedTopicsID", new string[] { }).ToArray(); - List Items = new List(); + //if (selectedTopicsID.Length < 1) + // return; - foreach (string topic in selectedTopicsID) - { - YouTubeService youtube = YoutubeEngine.youtubeService; + //if (YoutubeEngine.youtubeService == null) + // MainActivity.instance.Login(); - ChannelSectionsResource.ListRequest request = youtube.ChannelSections.List("snippet, contentDetails"); - request.ChannelId = topic; + //await MainActivity.instance.WaitForYoutube(); - ChannelSectionListResponse response = await request.ExecuteAsync(); + //List Items = new List(); - foreach (var section in response.Items) - { - if (section.Snippet.Type == "channelsectionTypeUndefined") - continue; + //foreach (string topic in selectedTopicsID) + //{ + // YouTubeService youtube = YoutubeEngine.youtubeService; - SectionType type = SectionType.None; - List contentValue = null; - switch (section.Snippet.Type) - { - case "multipleChannels": - type = SectionType.ChannelList; - contentValue = section.ContentDetails.Channels.ToList(); - break; - case "multiplePlaylists": - contentValue = section.ContentDetails.Playlists.ToList(); - type = SectionType.PlaylistList; - break; - case "singlePlaylist": - contentValue = section.ContentDetails.Playlists.ToList(); - type = SectionType.SinglePlaylist; - break; - default: - contentValue = new List(); - break; - } + // ChannelSectionsResource.ListRequest request = youtube.ChannelSections.List("snippet, contentDetails"); + // request.ChannelId = topic; - HomeItem item = new HomeItem(section.Snippet.Title, type, contentValue); - Items.Add(item); - } - } + // ChannelSectionListResponse response = await request.ExecuteAsync(); - List itemsSave = Items; - foreach(HomeItem item in Items) - { - List contentValue = new List - { - new Song("HeaderSlot", null, null, null, -1, -1, null) - }; + // foreach (var section in response.Items) + // { + // if (section.Snippet.Type == "channelsectionTypeUndefined") + // continue; - switch (item.contentType) - { - case SectionType.ChannelList: - if(adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) - { - foreach (string channelID in item.contentValue) - { - YouTubeService youtube = YoutubeEngine.youtubeService; + // SectionType type = SectionType.None; + // List contentValue = null; + // switch (section.Snippet.Type) + // { + // case "multipleChannels": + // type = SectionType.ChannelList; + // contentValue = section.ContentDetails.Channels.ToList(); + // break; + // case "multiplePlaylists": + // contentValue = section.ContentDetails.Playlists.ToList(); + // type = SectionType.PlaylistList; + // break; + // case "singlePlaylist": + // contentValue = section.ContentDetails.Playlists.ToList(); + // type = SectionType.SinglePlaylist; + // break; + // default: + // contentValue = new List(); + // break; + // } - ChannelsResource.ListRequest request = youtube.Channels.List("snippet"); - request.Id = channelID; + // HomeItem item = new HomeItem(section.Snippet.Title, type, contentValue); + // Items.Add(item); + // } + //} - ChannelListResponse response = await request.ExecuteAsync(); + //List itemsSave = Items; + //foreach(HomeItem item in Items) + //{ + // List contentValue = new List + // { + // new Song("HeaderSlot", null, null, null, -1, -1, null) + // }; - foreach (var ytItem in response.Items) - { - Song channel = new Song(ytItem.Snippet.Title, "", ytItem.Snippet.Thumbnails.Default__.Url, ytItem.Id, -1, -1, null, true); - contentValue.Add(channel); + // switch (item.contentType) + // { + // case SectionType.ChannelList: + // if(adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) + // { + // foreach (string channelID in item.contentValue) + // { + // YouTubeService youtube = YoutubeEngine.youtubeService; - if (instance == null) - return; - } + // ChannelsResource.ListRequest request = youtube.Channels.List("snippet"); + // request.Id = channelID; - } + // ChannelListResponse response = await request.ExecuteAsync(); - HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue); + // foreach (var ytItem in response.Items) + // { + // Song channel = new Song(ytItem.Snippet.Title, "", ytItem.Snippet.Thumbnails.Default__.Url, ytItem.Id, -1, -1, null, true); + // contentValue.Add(channel); - if (adapter == null) - { - adapterItems.Add(section); - adapter = new HomeAdapter(adapterItems); - ListView.SetAdapter(adapter); - adapter.ItemClick += ListView_ItemClick; - adapter.ItemLongClick += ListView_ItemLongCLick; - ListView.SetItemAnimator(new DefaultItemAnimator()); - ListView.ScrollChange += MainActivity.instance.Scroll; - } - else - { - adapterItems.Add(section); - adapter.AddToList(new List() { section }); - } - } - break; - case SectionType.SinglePlaylist: - if (adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) - { - YouTubeService youtube = YoutubeEngine.youtubeService; + // if (instance == null) + // return; + // } - PlaylistItemsResource.ListRequest request = youtube.PlaylistItems.List("snippet, contentDetails"); - request.PlaylistId = item.contentValue[0]; - request.MaxResults = 10; - request.PageToken = ""; + // } - PlaylistItemListResponse response = await request.ExecuteAsync(); + // HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue); - foreach (var ytItem in response.Items) - { - Song song = new Song(ytItem.Snippet.Title, ytItem.Snippet.ChannelTitle, ytItem.Snippet.Thumbnails.High.Url, ytItem.ContentDetails.VideoId, -1, -1, ytItem.ContentDetails.VideoId, true); - contentValue.Add(song); + // if (adapter == null) + // { + // adapterItems.Add(section); + // adapter = new HomeAdapter(adapterItems); + // ListView.SetAdapter(adapter); + // adapter.ItemClick += ListView_ItemClick; + // adapter.ItemLongClick += ListView_ItemLongCLick; + // ListView.SetItemAnimator(new DefaultItemAnimator()); + // ListView.ScrollChange += MainActivity.instance.Scroll; + // } + // else + // { + // adapterItems.Add(section); + // adapter.AddToList(new List() { section }); + // } + // } + // break; + // case SectionType.SinglePlaylist: + // if (adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) + // { + // YouTubeService youtube = YoutubeEngine.youtubeService; - if (instance == null) - return; - } + // PlaylistItemsResource.ListRequest request = youtube.PlaylistItems.List("snippet, contentDetails"); + // request.PlaylistId = item.contentValue[0]; + // request.MaxResults = 10; + // request.PageToken = ""; - HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue) - { - data = item.contentValue[0] - }; + // PlaylistItemListResponse response = await request.ExecuteAsync(); - if (adapter == null) - { - adapterItems.Add(section); - adapter = new HomeAdapter(adapterItems); - ListView.SetAdapter(adapter); - adapter.ItemClick += ListView_ItemClick; - adapter.ItemLongClick += ListView_ItemLongCLick; - ListView.SetItemAnimator(new DefaultItemAnimator()); - ListView.ScrollChange += MainActivity.instance.Scroll; - } - else - { - adapterItems.Add(section); - adapter.AddToList(new List() { section }); - } - } - break; - case SectionType.PlaylistList: - if (adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) - { - foreach (string playlistID in item.contentValue) - { - YouTubeService youtube = YoutubeEngine.youtubeService; + // foreach (var ytItem in response.Items) + // { + // Song song = new Song(ytItem.Snippet.Title, ytItem.Snippet.ChannelTitle, ytItem.Snippet.Thumbnails.High.Url, ytItem.ContentDetails.VideoId, -1, -1, ytItem.ContentDetails.VideoId, true); + // contentValue.Add(song); - PlaylistsResource.ListRequest request = youtube.Playlists.List("snippet, contentDetails"); - request.Id = playlistID; + // if (instance == null) + // return; + // } - PlaylistListResponse response = await request.ExecuteAsync(); + // HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue) + // { + // data = item.contentValue[0] + // }; + + // if (adapter == null) + // { + // adapterItems.Add(section); + // adapter = new HomeAdapter(adapterItems); + // ListView.SetAdapter(adapter); + // adapter.ItemClick += ListView_ItemClick; + // adapter.ItemLongClick += ListView_ItemLongCLick; + // ListView.SetItemAnimator(new DefaultItemAnimator()); + // ListView.ScrollChange += MainActivity.instance.Scroll; + // } + // else + // { + // adapterItems.Add(section); + // adapter.AddToList(new List() { section }); + // } + // } + // break; + // case SectionType.PlaylistList: + // if (adapterItems.Where(x => x.SectionTitle == item.SectionTitle).Count() == 0) + // { + // foreach (string playlistID in item.contentValue) + // { + // YouTubeService youtube = YoutubeEngine.youtubeService; + + // PlaylistsResource.ListRequest request = youtube.Playlists.List("snippet, contentDetails"); + // request.Id = playlistID; + + // PlaylistListResponse response = await request.ExecuteAsync(); - foreach (var playlist in response.Items) - { - Console.WriteLine("&" + playlist.Snippet.Title); - Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.Default__.Url, playlist.Id, -1, -1, playlist.Id, true); - contentValue.Add(song); + // foreach (var playlist in response.Items) + // { + // Console.WriteLine("&" + playlist.Snippet.Title); + // Song song = new Song(playlist.Snippet.Title, playlist.Snippet.ChannelTitle, playlist.Snippet.Thumbnails.Default__.Url, playlist.Id, -1, -1, playlist.Id, true); + // contentValue.Add(song); - if (instance == null) - return; - } - } + // if (instance == null) + // return; + // } + // } - HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue); - if (adapter == null) - { - adapterItems.Add(section); - adapter = new HomeAdapter(adapterItems); - ListView.SetAdapter(adapter); - adapter.ItemClick += ListView_ItemClick; - adapter.ItemLongClick += ListView_ItemLongCLick; - ListView.SetItemAnimator(new DefaultItemAnimator()); - ListView.ScrollChange += MainActivity.instance.Scroll; - } - else - { - adapterItems.Add(section); - adapter.AddToList(new List() { section }); - } - } - break; - default: - break; - } - } + // HomeSection section = new HomeSection(item.SectionTitle, item.contentType, contentValue); + // if (adapter == null) + // { + // adapterItems.Add(section); + // adapter = new HomeAdapter(adapterItems); + // ListView.SetAdapter(adapter); + // adapter.ItemClick += ListView_ItemClick; + // adapter.ItemLongClick += ListView_ItemLongCLick; + // ListView.SetItemAnimator(new DefaultItemAnimator()); + // ListView.ScrollChange += MainActivity.instance.Scroll; + // } + // else + // { + // adapterItems.Add(section); + // adapter.AddToList(new List() { section }); + // } + // } + // break; + // default: + // break; + // } + //} - if (instance == null) - return; + //if (instance == null) + // return; + #endregion } public static Fragment NewInstance() @@ -286,48 +300,48 @@ namespace MusicApp.Resources.Portable_Class private void ListView_ItemClick(object sender, int position) { - int pos = adapter.GetItemPosition(position, out int ContainerID); - HomeSection section = adapterItems[ContainerID]; - Song item = section.contentValue[pos]; + //int pos = adapter.GetItemPosition(position, out int ContainerID); + //HomeSection section = adapterItems[ContainerID]; + //Song item = section.contentValue[pos]; - if(pos == 0) - { - if (section.contentType == SectionType.SinglePlaylist) - { - MainActivity.parcelableSender = "Home"; - MainActivity.parcelable = ListView.GetLayoutManager().OnSaveInstanceState(); + //if(pos == 0) + //{ + // if (section.contentType == SectionType.SinglePlaylist) + // { + // MainActivity.parcelableSender = "Home"; + // MainActivity.parcelable = ListView.GetLayoutManager().OnSaveInstanceState(); - AppCompatActivity act = (AppCompatActivity)Activity; - act.SupportActionBar.SetHomeButtonEnabled(true); - act.SupportActionBar.SetDisplayHomeAsUpEnabled(true); - act.SupportActionBar.Title = section.SectionTitle; + // AppCompatActivity act = (AppCompatActivity)Activity; + // act.SupportActionBar.SetHomeButtonEnabled(true); + // act.SupportActionBar.SetDisplayHomeAsUpEnabled(true); + // act.SupportActionBar.Title = section.SectionTitle; - MainActivity.instance.HideTabs(); - MainActivity.instance.HomeDetails = true; - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(section.data, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); - } - } - else - { - if (section.contentType == SectionType.SinglePlaylist) - { - YoutubeEngine.Play(item.youtubeID, item.GetName(), item.GetArtist(), item.GetAlbum()); - } - else if (section.contentType == SectionType.PlaylistList) - { - MainActivity.parcelableSender = "Home"; - MainActivity.parcelable = ListView.GetLayoutManager().OnSaveInstanceState(); + // MainActivity.instance.HideTabs(); + // MainActivity.instance.HomeDetails = true; + // MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(section.data, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); + // } + //} + //else + //{ + // if (section.contentType == SectionType.SinglePlaylist) + // { + // YoutubeEngine.Play(item.youtubeID, item.GetName(), item.GetArtist(), item.GetAlbum()); + // } + // else if (section.contentType == SectionType.PlaylistList) + // { + // MainActivity.parcelableSender = "Home"; + // MainActivity.parcelable = ListView.GetLayoutManager().OnSaveInstanceState(); - AppCompatActivity act = (AppCompatActivity)Activity; - act.SupportActionBar.SetHomeButtonEnabled(true); - act.SupportActionBar.SetDisplayHomeAsUpEnabled(true); - act.SupportActionBar.Title = section.SectionTitle; + // AppCompatActivity act = (AppCompatActivity)Activity; + // act.SupportActionBar.SetHomeButtonEnabled(true); + // act.SupportActionBar.SetDisplayHomeAsUpEnabled(true); + // act.SupportActionBar.Title = section.SectionTitle; - MainActivity.instance.HideTabs(); - MainActivity.instance.HomeDetails = true; - MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); - } - } + // MainActivity.instance.HideTabs(); + // MainActivity.instance.HomeDetails = true; + // MainActivity.instance.Transition(Resource.Id.contentView, PlaylistTracks.NewInstance(item.youtubeID, item.GetName(), false, item.GetArtist(), -1, item.GetAlbum()), true); + // } + //} } private void ListView_ItemLongCLick(object sender, int e) diff --git a/MusicApp/Resources/Portable Class/HomeAdapter.cs b/MusicApp/Resources/Portable Class/HomeAdapter.cs index 038c1ea..ad6c267 100644 --- a/MusicApp/Resources/Portable Class/HomeAdapter.cs +++ b/MusicApp/Resources/Portable Class/HomeAdapter.cs @@ -13,7 +13,7 @@ namespace MusicApp.Resources.Portable_Class public class HomeAdapter : RecyclerView.Adapter { public List items; - private bool refreshDisabled = false; + private bool refreshDisabled = true; public event EventHandler ItemClick; public event EventHandler ItemLongClick; @@ -37,163 +37,20 @@ namespace MusicApp.Resources.Portable_Class NotifyItemRangeInserted(positionStart, items.Count); } - public override int ItemCount - { - get - { - int count = 0; - for(int i = 0; i < items.Count; i++) { count += items[i].contentValue.Count; } - return count; - } - } - - public int GetItemPosition(int position, out int containerID) - { - int pos = 0; - containerID = 0; - for(pos = position; pos - /*(items[containerID].contentType == SectionType.SinglePlaylist ? 2 :*/ items[containerID].contentValue.Count/*)*/ >= 0; pos -= /*(items[containerID - 1].contentType == SectionType.SinglePlaylist ? 2 : */items[containerID - 1].contentValue.Count/*)*/) - { - if (containerID + 1 < items.Count) - { - containerID++; - //Console.WriteLine("&Switching to the next container, containerID = " + containerID + " pos = " + pos + " Container value count : " + items[containerID]?.contentValue.Count); - } - } - - //Console.WriteLine("&Container ID : " + containerID + " Item Position : " + pos); - return pos; - } + public override int ItemCount { get { return items.Count; } } public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) { - if(viewType == (int)HomeRow.Header) - { - View itemView = LayoutInflater.From(parent.Context).Inflate(Android.Resource.Layout.PreferenceCategory, parent, false); - return new HeaderHolder(itemView, OnClick, OnLongClick); - } - if(viewType == (int)HomeRow.ChannelHolder) - { - View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.ChannelList, parent, false); - return new HomeChannelHolder(itemView, OnClick, OnLongClick); - } - if (viewType == (int)HomeRow.SongHolder) - { - View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.SongList, parent, false); - return new HomeHolder(itemView, OnClick, OnLongClick); - } - if(viewType == (int)HomeRow.MultipleSong) - { - View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.SquareSong, parent, false); - return new HomeMultipleSong(itemView, OnClick, OnLongClick); - } - return null; - } - - public override int GetItemViewType(int position) - { - int pos = GetItemPosition(position, out int containerID); - if (pos == 0) - return (int)HomeRow.Header; - else if (items[containerID].contentType == SectionType.PlaylistList) - return (int)HomeRow.SongHolder; - else if (items[containerID].contentType == SectionType.SinglePlaylist) - return (int)HomeRow.MultipleSong; - else - return (int)HomeRow.ChannelHolder; + View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.LineSongs, parent, false); + return new LineSongHolder(itemView, OnClick, OnLongClick); } public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { - position = GetItemPosition(position, out int containerID); - - if(position == 0) - { - HeaderHolder holder = (HeaderHolder)viewHolder; - holder.headerText.Text = items[containerID].SectionTitle; - } - else if(items[containerID].contentType == SectionType.ChannelList) - { - HomeChannelHolder holder = (HomeChannelHolder)viewHolder; - - holder.Title.Text = items[containerID].contentValue[position].GetName(); - holder.Artist.Text = items[containerID].contentValue[position].GetArtist(); - holder.CheckBox.Visibility = ViewStates.Gone; - - Picasso.With(Application.Context).Load(items[containerID].contentValue[position].GetAlbum()).Placeholder(Resource.Drawable.MusicIcon).Transform(new CircleTransformation()).Into(holder.AlbumArt); - - if (MainActivity.Theme == 1) - { - holder.Title.SetTextColor(Color.White); - holder.Artist.SetTextColor(Color.White); - holder.Artist.Alpha = 0.7f; - } - } - else if(items[containerID].contentType == SectionType.SinglePlaylist) - { - HomeMultipleSong holder = (HomeMultipleSong)viewHolder; - - holder.Title.Text = items[containerID].contentValue[position].GetName(); - holder.Artist.Text = items[containerID].contentValue[position].GetArtist(); - - int width = MainActivity.instance.Resources.DisplayMetrics.WidthPixels - (int)((20 - 0.5f) / MainActivity.instance.Resources.DisplayMetrics.Density); - int height = width / 16 * 9; - Picasso.With(Application.Context).Load(items[containerID].contentValue[position].GetAlbum()).Placeholder(Resource.Drawable.MusicIcon).Resize(width, height).CenterCrop().Into(holder.AlbumArt); - - holder.more.Tag = position; - if (!holder.more.HasOnClickListeners) - { - holder.more.Click += (sender, e) => - { - int tagPosition = (int)((ImageView)sender).Tag; - //Home.instance.More(items[tagPosition]); - }; - } - - if (MainActivity.Theme == 1) - { - holder.Title.SetTextColor(Color.White); - holder.Artist.SetTextColor(Color.White); - holder.Artist.Alpha = 0.7f; - holder.more.SetColorFilter(Color.White); - } - - if (MainActivity.Theme == 0) - holder.ItemView.SetBackgroundColor(Color.White); - else - holder.ItemView.SetBackgroundColor(Color.ParseColor("#424242")); - } - else - { - HomeHolder holder = (HomeHolder)viewHolder; - - holder.Title.Text = items[containerID].contentValue[position].GetName(); - holder.Artist.Text = items[containerID].contentValue[position].GetArtist(); - - Picasso.With(Application.Context).Load(items[containerID].contentValue[position].GetAlbum()).Placeholder(Resource.Drawable.MusicIcon).Resize(400, 400).CenterCrop().Into(holder.AlbumArt); - - //holder.more.Tag = position; - //if (!holder.more.HasOnClickListeners) - //{ - // holder.more.Click += (sender, e) => - // { - // int tagPosition = (int)((ImageView)sender).Tag; - // Home.instance.More(items[tagPosition]); - // }; - //} - - if (MainActivity.Theme == 1) - { - holder.more.SetColorFilter(Color.White); - holder.Title.SetTextColor(Color.White); - holder.Artist.SetTextColor(Color.White); - holder.Artist.Alpha = 0.7f; - } - - if (MainActivity.Theme == 0) - holder.ItemView.SetBackgroundColor(Color.White); - else - holder.ItemView.SetBackgroundColor(Color.ParseColor("#424242")); - } + LineSongHolder holder = (LineSongHolder)viewHolder; + holder.title.Text = items[position].SectionTitle; + holder.recycler.SetLayoutManager(new LinearLayoutManager(MainActivity.instance, LinearLayoutManager.Horizontal, false)); + holder.recycler.SetAdapter(new LineAdapter(items[position].contentValue)); } void OnClick(int position) @@ -216,13 +73,4 @@ namespace MusicApp.Resources.Portable_Class refreshDisabled = disable; } } - - - public enum HomeRow - { - Header = 0, - SongHolder = 1, - ChannelHolder = 2, - MultipleSong = 3, - } -} \ No newline at end of file + } \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/LineAdapter.cs b/MusicApp/Resources/Portable Class/LineAdapter.cs new file mode 100644 index 0000000..dcd7284 --- /dev/null +++ b/MusicApp/Resources/Portable Class/LineAdapter.cs @@ -0,0 +1,50 @@ +using Android.App; +using Android.Content; +using Android.Graphics; +using Android.Support.V7.Widget; +using Android.Views; +using Android.Widget; +using MusicApp.Resources.values; +using Square.Picasso; +using System; +using System.Collections.Generic; + +namespace MusicApp.Resources.Portable_Class +{ + public class LineAdapter : RecyclerView.Adapter + { + public int listPadding = 0; + private List songList; + + public override int ItemCount => songList.Count; + + public LineAdapter(List songList) + { + this.songList = songList; + } + + public override void OnBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) + { + RecyclerHolder holder = (RecyclerHolder)viewHolder; + + if (songList[position].GetAlbumArt() == -1 || songList[position].IsYt) + { + var songAlbumArtUri = Android.Net.Uri.Parse(songList[position].GetAlbum()); + Picasso.With(Application.Context).Load(songAlbumArtUri).Placeholder(Resource.Drawable.MusicIcon).Resize(400, 400).CenterCrop().Into(holder.AlbumArt); + } + else + { + var songCover = Android.Net.Uri.Parse("content://media/external/audio/albumart"); + var songAlbumArtUri = ContentUris.WithAppendedId(songCover, songList[position].GetAlbumArt()); + + Picasso.With(Application.Context).Load(songAlbumArtUri).Placeholder(Resource.Drawable.MusicIcon).Resize(400, 400).CenterCrop().Into(holder.AlbumArt); + } + } + + public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) + { + View itemView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.LineSong, parent, false); + return new RecyclerHolder(itemView, null, null); + } + } +} \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/LineSongHolder.cs b/MusicApp/Resources/Portable Class/LineSongHolder.cs new file mode 100644 index 0000000..1b6ae86 --- /dev/null +++ b/MusicApp/Resources/Portable Class/LineSongHolder.cs @@ -0,0 +1,23 @@ +using Android.Graphics; +using Android.Support.V7.Widget; +using Android.Views; +using Android.Widget; +using System; + +namespace MusicApp.Resources.Portable_Class +{ + public class LineSongHolder : RecyclerView.ViewHolder + { + public TextView title; + public RecyclerView recycler; + + public LineSongHolder(View itemView, Action listener, Action longListener) : base(itemView) + { + title = itemView.FindViewById(Resource.Id.title); + recycler = itemView.FindViewById(Resource.Id.lineRecycler); + + itemView.Click += (sender, e) => listener(AdapterPosition); + itemView.LongClick += (sender, e) => longListener(AdapterPosition); + } + } +} \ No newline at end of file diff --git a/MusicApp/Resources/Portable Class/Playlist.cs b/MusicApp/Resources/Portable Class/Playlist.cs index 03116fa..be66f55 100644 --- a/MusicApp/Resources/Portable Class/Playlist.cs +++ b/MusicApp/Resources/Portable Class/Playlist.cs @@ -389,7 +389,7 @@ namespace MusicApp.Resources.Portable_Class string Artist = musicCursor.GetString(artistID); string Title = musicCursor.GetString(titleID); string Album = musicCursor.GetString(albumID); - long AlbumArt = musicCursor.GetLong(musicCursor.GetColumnIndex(MediaStore.Audio.Albums.InterfaceConsts.AlbumId)); + long AlbumArt = musicCursor.GetLong(musicCursor.GetColumnIndex(Albums.InterfaceConsts.AlbumId)); long id = musicCursor.GetLong(thisID); string path = musicCursor.GetString(pathID); @@ -411,7 +411,6 @@ namespace MusicApp.Resources.Portable_Class songs.RemoveAt(0); songs.Reverse(); - while (MusicPlayer.instance == null) await Task.Delay(10); diff --git a/MusicApp/Resources/Portable Class/PlaylistTracks.cs b/MusicApp/Resources/Portable Class/PlaylistTracks.cs index abb5977..309787d 100644 --- a/MusicApp/Resources/Portable Class/PlaylistTracks.cs +++ b/MusicApp/Resources/Portable Class/PlaylistTracks.cs @@ -62,7 +62,7 @@ namespace MusicApp.Resources.Portable_Class ((AppBarLayout.LayoutParams)Activity.FindViewById(Resource.Id.collapsingToolbar).LayoutParameters).ScrollFlags = AppBarLayout.LayoutParams.ScrollFlagScroll | AppBarLayout.LayoutParams.ScrollFlagExitUntilCollapsed | AppBarLayout.LayoutParams.ScrollFlagSnap; Activity.FindViewById(Resource.Id.appbar).AddOnOffsetChangedListener(this); Activity.FindViewById(Resource.Id.headerTitle).Text = playlistName; - Activity.FindViewById(Resource.Id.headerPlay).Click += (sender, e0) => { PlayInOrder(0); }; + Activity.FindViewById(Resource.Id.headerPlay).Click += (sender, e0) => { PlayInOrder(0, false); }; Activity.FindViewById(Resource.Id.headerShuffle).Click += (sender, e0) => { if (playlistId != 0) @@ -406,7 +406,7 @@ namespace MusicApp.Resources.Portable_Class private void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { - PlayInOrder(e.Position); + PlayInOrder(e.Position, true); } private void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e) @@ -443,7 +443,7 @@ namespace MusicApp.Resources.Portable_Class { case 0: int Position = tracks.IndexOf(item); - PlayInOrder(Position); + PlayInOrder(Position, true); break; case 1: @@ -499,7 +499,7 @@ namespace MusicApp.Resources.Portable_Class { case 0: int Position = tracks.IndexOf(item); - PlayInOrder(Position); + PlayInOrder(Position, true); break; case 1: @@ -535,19 +535,19 @@ namespace MusicApp.Resources.Portable_Class builder.Show(); } - async void PlayInOrder(int fromPosition) + async void PlayInOrder(int fromPosition, bool useTransition) { 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(); + MusicPlayer.queue.Clear(); + MusicPlayer.currentID = -1; if (!songs[0].IsYt) { Browse.act = Activity; - Browse.Play(songs[0], ListView.GetChildAt(fromPosition - ListView.FirstVisiblePosition).FindViewById(Resource.Id.albumArt)); + Browse.Play(songs[0], useTransition ? ListView.GetChildAt(fromPosition - ListView.FirstVisiblePosition).FindViewById(Resource.Id.albumArt) : null); } else YoutubeEngine.Play(songs[0].youtubeID, songs[0].GetName(), songs[0].GetArtist(), songs[0].GetAlbum()); @@ -558,7 +558,6 @@ namespace MusicApp.Resources.Portable_Class while (MusicPlayer.instance == null) await Task.Delay(10); - MusicPlayer.currentID = -1; foreach (Song song in songs) { MusicPlayer.instance.AddToQueue(song); diff --git a/MusicApp/Resources/Resource.Designer.cs b/MusicApp/Resources/Resource.Designer.cs index e3e1aaf..383a400 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: 0x7f0a0112 - public const int PreferenceScreen = 2131362066; + // aapt resource value: 0x7f0a0114 + public const int PreferenceScreen = 2131362068; // aapt resource value: 0x7f0a0052 public const int SHIFT = 2131361874; @@ -3097,11 +3097,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0053 public const int SYM = 2131361875; - // aapt resource value: 0x7f0a0113 - public const int accountPreference = 2131362067; + // aapt resource value: 0x7f0a0115 + public const int accountPreference = 2131362069; - // aapt resource value: 0x7f0a00e2 - public const int action0 = 2131362018; + // aapt resource value: 0x7f0a00e4 + public const int action0 = 2131362020; // aapt resource value: 0x7f0a009e public const int action_bar = 2131361950; @@ -3124,17 +3124,17 @@ namespace MusicApp // aapt resource value: 0x7f0a007c public const int action_bar_title = 2131361916; - // aapt resource value: 0x7f0a00df - public const int action_container = 2131362015; + // aapt resource value: 0x7f0a00e1 + public const int action_container = 2131362017; // aapt resource value: 0x7f0a009f public const int action_context_bar = 2131361951; - // aapt resource value: 0x7f0a00e6 - public const int action_divider = 2131362022; + // aapt resource value: 0x7f0a00e8 + public const int action_divider = 2131362024; - // aapt resource value: 0x7f0a00e0 - public const int action_image = 2131362016; + // aapt resource value: 0x7f0a00e2 + public const int action_image = 2131362018; // aapt resource value: 0x7f0a0003 public const int action_menu_divider = 2131361795; @@ -3151,11 +3151,11 @@ namespace MusicApp // aapt resource value: 0x7f0a007e public const int action_mode_close_button = 2131361918; - // aapt resource value: 0x7f0a00e1 - public const int action_text = 2131362017; + // aapt resource value: 0x7f0a00e3 + public const int action_text = 2131362019; - // aapt resource value: 0x7f0a00ef - public const int actions = 2131362031; + // aapt resource value: 0x7f0a00f1 + public const int actions = 2131362033; // aapt resource value: 0x7f0a007f public const int activity_chooser_view_content = 2131361919; @@ -3181,8 +3181,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0054 public const int always = 2131361876; - // aapt resource value: 0x7f0a00d5 - public const int appbar = 2131362005; + // aapt resource value: 0x7f0a00d7 + public const int appbar = 2131362007; // aapt resource value: 0x7f0a00b1 public const int artist = 2131361969; @@ -3205,11 +3205,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0059 public const int bottom = 2131361881; - // aapt resource value: 0x7f0a00dc - public const int bottomView = 2131362012; + // aapt resource value: 0x7f0a00de + public const int bottomView = 2131362014; - // aapt resource value: 0x7f0a0130 - public const int browseLayout = 2131362096; + // aapt resource value: 0x7f0a0132 + public const int browseLayout = 2131362098; // aapt resource value: 0x7f0a00ae public const int browseList = 2131361966; @@ -3220,11 +3220,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0085 public const int buttonPanel = 2131361925; - // aapt resource value: 0x7f0a00e3 - public const int cancel_action = 2131362019; + // aapt resource value: 0x7f0a00e5 + public const int cancel_action = 2131362021; - // aapt resource value: 0x7f0a011c - public const int cardPlayer = 2131362076; + // aapt resource value: 0x7f0a011e + public const int cardPlayer = 2131362078; // aapt resource value: 0x7f0a0060 public const int center = 2131361888; @@ -3241,8 +3241,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0095 public const int checkbox = 2131361941; - // aapt resource value: 0x7f0a00eb - public const int chronometer = 2131362027; + // aapt resource value: 0x7f0a00ed + public const int chronometer = 2131362029; // aapt resource value: 0x7f0a0069 public const int clip_horizontal = 2131361897; @@ -3262,11 +3262,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0088 public const int contentPanel = 2131361928; - // aapt resource value: 0x7f0a00d8 - public const int contentRefresh = 2131362008; + // aapt resource value: 0x7f0a00da + public const int contentRefresh = 2131362010; - // aapt resource value: 0x7f0a00d9 - public const int contentView = 2131362009; + // aapt resource value: 0x7f0a00db + public const int contentView = 2131362011; // aapt resource value: 0x7f0a00b7 public const int coordinator = 2131361975; @@ -3286,8 +3286,8 @@ 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: 0x7f0a0137 + public const int delete = 2131362103; // aapt resource value: 0x7f0a00b9 public const int design_bottom_sheet = 2131361977; @@ -3307,17 +3307,17 @@ namespace MusicApp // aapt resource value: 0x7f0a003d public const int disableHome = 2131361853; - // aapt resource value: 0x7f0a0103 - public const int downFAB = 2131362051; + // aapt resource value: 0x7f0a0105 + public const int downFAB = 2131362053; - // aapt resource value: 0x7f0a013a - public const int download = 2131362106; + // aapt resource value: 0x7f0a013c + public const int download = 2131362108; - // aapt resource value: 0x7f0a0132 - public const int downloadMDfromYT = 2131362098; + // aapt resource value: 0x7f0a0134 + public const int downloadMDfromYT = 2131362100; - // aapt resource value: 0x7f0a0128 - public const int edit = 2131362088; + // aapt resource value: 0x7f0a012a + public const int edit = 2131362090; // aapt resource value: 0x7f0a00a0 public const int edit_query = 2131361952; @@ -3328,8 +3328,8 @@ namespace MusicApp // aapt resource value: 0x7f0a004c public const int end = 2131361868; - // aapt resource value: 0x7f0a00f1 - public const int end_padder = 2131362033; + // aapt resource value: 0x7f0a00f3 + public const int end_padder = 2131362035; // aapt resource value: 0x7f0a005b public const int enterAlways = 2131361883; @@ -3421,8 +3421,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0063 public const int fill_vertical = 2131361891; - // aapt resource value: 0x7f0a0138 - public const int filter = 2131362104; + // aapt resource value: 0x7f0a013a + public const int filter = 2131362106; // aapt resource value: 0x7f0a0076 public const int fit = 2131361910; @@ -3448,29 +3448,32 @@ namespace MusicApp // aapt resource value: 0x7f0a0073 public const int forever = 2131361907; + // aapt resource value: 0x7f0a00d1 + public const int frame = 2131362001; + // aapt resource value: 0x7f0a000a public const int ghost_view = 2131361802; - // aapt resource value: 0x7f0a0104 - public const int headerArt = 2131362052; - // aapt resource value: 0x7f0a0106 - public const int headerAuthor = 2131362054; - - // aapt resource value: 0x7f0a010a - public const int headerMore = 2131362058; - - // aapt resource value: 0x7f0a0107 - public const int headerNumber = 2131362055; + public const int headerArt = 2131362054; // aapt resource value: 0x7f0a0108 - public const int headerPlay = 2131362056; + public const int headerAuthor = 2131362056; + + // aapt resource value: 0x7f0a010c + public const int headerMore = 2131362060; // aapt resource value: 0x7f0a0109 - public const int headerShuffle = 2131362057; + public const int headerNumber = 2131362057; - // aapt resource value: 0x7f0a0105 - public const int headerTitle = 2131362053; + // aapt resource value: 0x7f0a010a + public const int headerPlay = 2131362058; + + // aapt resource value: 0x7f0a010b + public const int headerShuffle = 2131362059; + + // aapt resource value: 0x7f0a0107 + public const int headerTitle = 2131362055; // aapt resource value: 0x7f0a0005 public const int home = 2131361797; @@ -3481,11 +3484,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0084 public const int icon = 2131361924; - // aapt resource value: 0x7f0a010b - public const int icon_frame = 2131362059; + // aapt resource value: 0x7f0a010d + public const int icon_frame = 2131362061; - // aapt resource value: 0x7f0a00f0 - public const int icon_group = 2131362032; + // aapt resource value: 0x7f0a00f2 + public const int icon_group = 2131362034; // aapt resource value: 0x7f0a0034 public const int icon_only = 2131361844; @@ -3496,11 +3499,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0081 public const int image = 2131361921; - // aapt resource value: 0x7f0a00ec - public const int info = 2131362028; + // aapt resource value: 0x7f0a00ee + public const int info = 2131362030; - // aapt resource value: 0x7f0a00fa - public const int infoPanel = 2131362042; + // aapt resource value: 0x7f0a00fc + public const int infoPanel = 2131362044; // aapt resource value: 0x7f0a0074 public const int italic = 2131361908; @@ -3511,8 +3514,8 @@ namespace MusicApp // aapt resource value: 0x7f0a00b5 public const int largeLabel = 2131361973; - // aapt resource value: 0x7f0a00f3 - public const int lastButton = 2131362035; + // aapt resource value: 0x7f0a00f5 + public const int lastButton = 2131362037; // aapt resource value: 0x7f0a0064 public const int left = 2131361892; @@ -3523,14 +3526,17 @@ namespace MusicApp // aapt resource value: 0x7f0a0017 public const int line1 = 2131361815; - // aapt resource value: 0x7f0a012c - public const int line2 = 2131362092; + // aapt resource value: 0x7f0a012e + public const int line2 = 2131362094; // aapt resource value: 0x7f0a0018 public const int line3 = 2131361816; - // aapt resource value: 0x7f0a010d - public const int list = 2131362061; + // aapt resource value: 0x7f0a00d2 + public const int lineRecycler = 2131362002; + + // aapt resource value: 0x7f0a010f + public const int list = 2131362063; // aapt resource value: 0x7f0a003a public const int listMode = 2131361850; @@ -3538,23 +3544,23 @@ namespace MusicApp // aapt resource value: 0x7f0a0083 public const int list_item = 2131361923; - // aapt resource value: 0x7f0a0115 - public const int localPlay = 2131362069; + // aapt resource value: 0x7f0a0117 + public const int localPlay = 2131362071; - // aapt resource value: 0x7f0a00d4 - public const int logButton = 2131362004; + // aapt resource value: 0x7f0a00d6 + public const int logButton = 2131362006; - // aapt resource value: 0x7f0a012e - public const int masked = 2131362094; + // aapt resource value: 0x7f0a0130 + public const int masked = 2131362096; - // aapt resource value: 0x7f0a011b - public const int maxValue = 2131362075; + // aapt resource value: 0x7f0a011d + public const int maxValue = 2131362077; - // aapt resource value: 0x7f0a00e5 - public const int media_actions = 2131362021; + // aapt resource value: 0x7f0a00e7 + public const int media_actions = 2131362023; - // aapt resource value: 0x7f0a012b - public const int message = 2131362091; + // aapt resource value: 0x7f0a012d + public const int message = 2131362093; // aapt resource value: 0x7f0a00c8 public const int metadataAlbum = 2131361992; @@ -3580,20 +3586,20 @@ namespace MusicApp // aapt resource value: 0x7f0a004d public const int middle = 2131361869; - // aapt resource value: 0x7f0a011a - public const int minValue = 2131362074; + // aapt resource value: 0x7f0a011c + public const int minValue = 2131362076; // aapt resource value: 0x7f0a006e public const int mini = 2131361902; - // aapt resource value: 0x7f0a0129 - public const int moreButton = 2131362089; + // aapt resource value: 0x7f0a012b + public const int moreButton = 2131362091; // aapt resource value: 0x7f0a0044 public const int multiply = 2131361860; - // aapt resource value: 0x7f0a012f - public const int musicLayout = 2131362095; + // aapt resource value: 0x7f0a0131 + public const int musicLayout = 2131362097; // aapt resource value: 0x7f0a00bc public const int navigation_header_container = 2131361980; @@ -3601,23 +3607,23 @@ namespace MusicApp // aapt resource value: 0x7f0a0057 public const int never = 2131361879; - // aapt resource value: 0x7f0a00fe - public const int nextArt = 2131362046; - // aapt resource value: 0x7f0a0100 - public const int nextArtist = 2131362048; + public const int nextArt = 2131362048; - // aapt resource value: 0x7f0a00f5 - public const int nextButton = 2131362037; + // aapt resource value: 0x7f0a0102 + public const int nextArtist = 2131362050; - // aapt resource value: 0x7f0a00fd - public const int nextSong = 2131362045; + // aapt resource value: 0x7f0a00f7 + public const int nextButton = 2131362039; // aapt resource value: 0x7f0a00ff - public const int nextTitle = 2131362047; + public const int nextSong = 2131362047; - // aapt resource value: 0x7f0a00de - public const int noPlaylist = 2131362014; + // aapt resource value: 0x7f0a0101 + public const int nextTitle = 2131362049; + + // aapt resource value: 0x7f0a00e0 + public const int noPlaylist = 2131362016; // aapt resource value: 0x7f0a0033 public const int none = 2131361843; @@ -3625,20 +3631,20 @@ namespace MusicApp // aapt resource value: 0x7f0a003b public const int normal = 2131361851; - // aapt resource value: 0x7f0a00ee - public const int notification_background = 2131362030; + // aapt resource value: 0x7f0a00f0 + public const int notification_background = 2131362032; - // aapt resource value: 0x7f0a00e8 - public const int notification_main_column = 2131362024; + // aapt resource value: 0x7f0a00ea + public const int notification_main_column = 2131362026; - // aapt resource value: 0x7f0a00e7 - public const int notification_main_column_container = 2131362023; + // aapt resource value: 0x7f0a00e9 + public const int notification_main_column_container = 2131362025; // aapt resource value: 0x7f0a0075 public const int one = 2131361909; - // aapt resource value: 0x7f0a012a - public const int pager = 2131362090; + // aapt resource value: 0x7f0a012c + public const int pager = 2131362092; // aapt resource value: 0x7f0a0067 public const int parallax = 2131361895; @@ -3652,44 +3658,44 @@ namespace MusicApp // aapt resource value: 0x7f0a0068 public const int pin = 2131361896; - // aapt resource value: 0x7f0a00f4 - public const int playButton = 2131362036; - - // aapt resource value: 0x7f0a00f2 - public const int playerAlbum = 2131362034; - - // aapt resource value: 0x7f0a00fc - public const int playerArtist = 2131362044; - - // aapt resource value: 0x7f0a00f8 - public const int playerDownload = 2131362040; - - // aapt resource value: 0x7f0a00f7 - public const int playerPlaylistAdd = 2131362039; - // aapt resource value: 0x7f0a00f6 - public const int playerSleep = 2131362038; + public const int playButton = 2131362038; - // aapt resource value: 0x7f0a00fb - public const int playerTitle = 2131362043; + // aapt resource value: 0x7f0a00f4 + public const int playerAlbum = 2131362036; + + // aapt resource value: 0x7f0a00fe + public const int playerArtist = 2131362046; + + // aapt resource value: 0x7f0a00fa + public const int playerDownload = 2131362042; // aapt resource value: 0x7f0a00f9 - public const int playerYoutube = 2131362041; + public const int playerPlaylistAdd = 2131362041; - // aapt resource value: 0x7f0a00d6 - public const int playlistHeader = 2131362006; + // aapt resource value: 0x7f0a00f8 + public const int playerSleep = 2131362040; - // aapt resource value: 0x7f0a0131 - public const int playlistLayout = 2131362097; + // aapt resource value: 0x7f0a00fd + public const int playerTitle = 2131362045; + + // aapt resource value: 0x7f0a00fb + public const int playerYoutube = 2131362043; + + // aapt resource value: 0x7f0a00d8 + public const int playlistHeader = 2131362008; + + // aapt resource value: 0x7f0a0133 + public const int playlistLayout = 2131362099; // aapt resource value: 0x7f0a00b3 public const int playlistName = 2131361971; - // aapt resource value: 0x7f0a0118 - public const int playlistURL = 2131362072; + // aapt resource value: 0x7f0a011a + public const int playlistURL = 2131362074; - // aapt resource value: 0x7f0a0111 - public const int preferenceContent = 2131362065; + // aapt resource value: 0x7f0a0113 + public const int preferenceContent = 2131362067; // aapt resource value: 0x7f0a0006 public const int progress_circular = 2131361798; @@ -3697,35 +3703,35 @@ namespace MusicApp // aapt resource value: 0x7f0a0007 public const int progress_horizontal = 2131361799; - // aapt resource value: 0x7f0a0117 - public const int quickPlay = 2131362071; + // aapt resource value: 0x7f0a0119 + public const int quickPlay = 2131362073; - // aapt resource value: 0x7f0a0114 - public const int quickPlayLinear = 2131362068; + // aapt resource value: 0x7f0a0116 + public const int quickPlayLinear = 2131362070; // aapt resource value: 0x7f0a0097 public const int radio = 2131361943; - // aapt resource value: 0x7f0a00d3 - public const int recycler = 2131362003; + // aapt resource value: 0x7f0a00d5 + public const int recycler = 2131362005; - // aapt resource value: 0x7f0a0134 - public const int rename = 2131362100; + // aapt resource value: 0x7f0a0136 + public const int rename = 2131362102; - // aapt resource value: 0x7f0a0125 - public const int reorder = 2131362085; + // aapt resource value: 0x7f0a0127 + public const int reorder = 2131362087; - // aapt resource value: 0x7f0a0137 - public const int repeat = 2131362103; + // aapt resource value: 0x7f0a0139 + public const int repeat = 2131362105; // aapt resource value: 0x7f0a0065 public const int right = 2131361893; - // aapt resource value: 0x7f0a00ed - public const int right_icon = 2131362029; + // aapt resource value: 0x7f0a00ef + public const int right_icon = 2131362031; - // aapt resource value: 0x7f0a00e9 - public const int right_side = 2131362025; + // aapt resource value: 0x7f0a00eb + public const int right_side = 2131362027; // aapt resource value: 0x7f0a000c public const int save_image_matrix = 2131361804; @@ -3754,8 +3760,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0070 public const int scrollable = 2131361904; - // aapt resource value: 0x7f0a0119 - public const int search = 2131362073; + // aapt resource value: 0x7f0a011b + public const int search = 2131362075; // aapt resource value: 0x7f0a00a2 public const int search_badge = 2131361954; @@ -3787,17 +3793,17 @@ namespace MusicApp // aapt resource value: 0x7f0a00ab public const int search_voice_btn = 2131361963; - // aapt resource value: 0x7f0a010e - public const int seekbar = 2131362062; + // aapt resource value: 0x7f0a0110 + public const int seekbar = 2131362064; - // aapt resource value: 0x7f0a010f - public const int seekbar_value = 2131362063; + // aapt resource value: 0x7f0a0111 + public const int seekbar_value = 2131362065; // aapt resource value: 0x7f0a00ac public const int select_dialog_listview = 2131361964; - // aapt resource value: 0x7f0a0139 - public const int settings = 2131362105; + // aapt resource value: 0x7f0a013b + public const int settings = 2131362107; // aapt resource value: 0x7f0a0096 public const int shortcut = 2131361942; @@ -3808,23 +3814,23 @@ namespace MusicApp // aapt resource value: 0x7f0a0040 public const int showHome = 2131361856; - // aapt resource value: 0x7f0a0101 - public const int showQueue = 2131362049; + // aapt resource value: 0x7f0a0103 + public const int showQueue = 2131362051; // aapt resource value: 0x7f0a0041 public const int showTitle = 2131361857; - // aapt resource value: 0x7f0a0136 - public const int shuffle = 2131362102; + // aapt resource value: 0x7f0a0138 + public const int shuffle = 2131362104; // aapt resource value: 0x7f0a00b4 public const int smallLabel = 2131361972; - // aapt resource value: 0x7f0a00da - public const int smallPlayer = 2131362010; + // aapt resource value: 0x7f0a00dc + public const int smallPlayer = 2131362012; - // aapt resource value: 0x7f0a00db - public const int snackBar = 2131362011; + // aapt resource value: 0x7f0a00dd + public const int snackBar = 2131362013; // aapt resource value: 0x7f0a00bb public const int snackbar_action = 2131361979; @@ -3835,38 +3841,38 @@ namespace MusicApp // aapt resource value: 0x7f0a005f public const int snap = 2131361887; - // aapt resource value: 0x7f0a0102 - public const int songTimer = 2131362050; - - // aapt resource value: 0x7f0a011e - public const int spArt = 2131362078; + // aapt resource value: 0x7f0a0104 + public const int songTimer = 2131362052; // aapt resource value: 0x7f0a0120 - public const int spArtist = 2131362080; - - // aapt resource value: 0x7f0a011d - public const int spContainer = 2131362077; - - // aapt resource value: 0x7f0a0123 - public const int spLast = 2131362083; - - // aapt resource value: 0x7f0a0121 - public const int spNext = 2131362081; + public const int spArt = 2131362080; // aapt resource value: 0x7f0a0122 - public const int spPlay = 2131362082; - - // aapt resource value: 0x7f0a0124 - public const int spProgress = 2131362084; + public const int spArtist = 2131362082; // aapt resource value: 0x7f0a011f - public const int spTitle = 2131362079; + public const int spContainer = 2131362079; + + // aapt resource value: 0x7f0a0125 + public const int spLast = 2131362085; + + // aapt resource value: 0x7f0a0123 + public const int spNext = 2131362083; + + // aapt resource value: 0x7f0a0124 + public const int spPlay = 2131362084; + + // aapt resource value: 0x7f0a0126 + public const int spProgress = 2131362086; + + // aapt resource value: 0x7f0a0121 + public const int spTitle = 2131362081; // aapt resource value: 0x7f0a0086 public const int spacer = 2131361926; - // aapt resource value: 0x7f0a010c - public const int spinner = 2131362060; + // aapt resource value: 0x7f0a010e + public const int spinner = 2131362062; // aapt resource value: 0x7f0a0008 public const int split_action_bar = 2131361800; @@ -3886,11 +3892,11 @@ namespace MusicApp // aapt resource value: 0x7f0a0066 public const int start = 2131361894; - // aapt resource value: 0x7f0a0126 - public const int status = 2131362086; + // aapt resource value: 0x7f0a0128 + public const int status = 2131362088; - // aapt resource value: 0x7f0a00e4 - public const int status_bar_latest_event_content = 2131362020; + // aapt resource value: 0x7f0a00e6 + public const int status_bar_latest_event_content = 2131362022; // aapt resource value: 0x7f0a0098 public const int submenuarrow = 2131361944; @@ -3901,14 +3907,14 @@ namespace MusicApp // aapt resource value: 0x7f0a007a public const int surface_view = 2131361914; - // aapt resource value: 0x7f0a0110 - public const int switchWidget = 2131362064; + // aapt resource value: 0x7f0a0112 + public const int switchWidget = 2131362066; // aapt resource value: 0x7f0a003c public const int tabMode = 2131361852; - // aapt resource value: 0x7f0a00d7 - public const int tabs = 2131362007; + // aapt resource value: 0x7f0a00d9 + public const int tabs = 2131362009; // aapt resource value: 0x7f0a0019 public const int tag_transition_group = 2131361817; @@ -3916,8 +3922,8 @@ namespace MusicApp // aapt resource value: 0x7f0a001a public const int text = 2131361818; - // aapt resource value: 0x7f0a00dd - public const int text1 = 2131362013; + // aapt resource value: 0x7f0a00df + public const int text1 = 2131362015; // aapt resource value: 0x7f0a001b public const int text2 = 2131361819; @@ -3943,8 +3949,8 @@ namespace MusicApp // aapt resource value: 0x7f0a007b public const int texture_view = 2131361915; - // aapt resource value: 0x7f0a00ea - public const int time = 2131362026; + // aapt resource value: 0x7f0a00ec + public const int time = 2131362028; // aapt resource value: 0x7f0a001c public const int title = 2131361820; @@ -3955,8 +3961,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0091 public const int title_template = 2131361937; - // aapt resource value: 0x7f0a00d1 - public const int toolbar = 2131362001; + // aapt resource value: 0x7f0a00d3 + public const int toolbar = 2131362003; // aapt resource value: 0x7f0a005a public const int top = 2131361882; @@ -3982,8 +3988,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0013 public const int transition_transform = 2131361811; - // aapt resource value: 0x7f0a0133 - public const int undoChange = 2131362099; + // aapt resource value: 0x7f0a0135 + public const int undoChange = 2131362101; // aapt resource value: 0x7f0a0049 public const int uniform = 2131361865; @@ -3997,8 +4003,8 @@ namespace MusicApp // aapt resource value: 0x7f0a0016 public const int view_offset_helper = 2131361814; - // aapt resource value: 0x7f0a012d - public const int visible = 2131362093; + // aapt resource value: 0x7f0a012f + public const int visible = 2131362095; // aapt resource value: 0x7f0a0036 public const int wide = 2131361846; @@ -4009,14 +4015,14 @@ namespace MusicApp // aapt resource value: 0x7f0a004a public const int wrap_content = 2131361866; - // aapt resource value: 0x7f0a0127 - public const int youtubeIcon = 2131362087; + // aapt resource value: 0x7f0a0129 + public const int youtubeIcon = 2131362089; - // aapt resource value: 0x7f0a0116 - public const int ytPlay = 2131362070; + // aapt resource value: 0x7f0a0118 + public const int ytPlay = 2131362072; - // aapt resource value: 0x7f0a00d2 - public const int ytProgress = 2131362002; + // aapt resource value: 0x7f0a00d4 + public const int ytProgress = 2131362004; // aapt resource value: 0x7f0a0079 public const int zoom = 2131361913; @@ -4246,178 +4252,184 @@ namespace MusicApp public const int folderList = 2130903094; // aapt resource value: 0x7f030037 - public const int ListPopupLayout = 2130903095; + public const int LineSong = 2130903095; // aapt resource value: 0x7f030038 - public const int LogOutButton = 2130903096; + public const int LineSongs = 2130903096; // aapt resource value: 0x7f030039 - public const int Main = 2130903097; + public const int ListPopupLayout = 2130903097; // aapt resource value: 0x7f03003a - public const int MusicLayout = 2130903098; + public const int LogOutButton = 2130903098; // aapt resource value: 0x7f03003b - public const int NoPlaylist = 2130903099; + public const int Main = 2130903099; // aapt resource value: 0x7f03003c - public const int NoQueue = 2130903100; + public const int MusicLayout = 2130903100; // aapt resource value: 0x7f03003d - public const int NoSong = 2130903101; + public const int NoPlaylist = 2130903101; // aapt resource value: 0x7f03003e - public const int notification_action = 2130903102; + public const int NoQueue = 2130903102; // aapt resource value: 0x7f03003f - public const int notification_action_tombstone = 2130903103; + public const int NoSong = 2130903103; // aapt resource value: 0x7f030040 - public const int notification_media_action = 2130903104; + public const int notification_action = 2130903104; // aapt resource value: 0x7f030041 - public const int notification_media_cancel_action = 2130903105; + public const int notification_action_tombstone = 2130903105; // aapt resource value: 0x7f030042 - public const int notification_template_big_media = 2130903106; + public const int notification_media_action = 2130903106; // aapt resource value: 0x7f030043 - public const int notification_template_big_media_custom = 2130903107; + public const int notification_media_cancel_action = 2130903107; // aapt resource value: 0x7f030044 - public const int notification_template_big_media_narrow = 2130903108; + public const int notification_template_big_media = 2130903108; // aapt resource value: 0x7f030045 - public const int notification_template_big_media_narrow_custom = 2130903109; + public const int notification_template_big_media_custom = 2130903109; // aapt resource value: 0x7f030046 - public const int notification_template_custom_big = 2130903110; + public const int notification_template_big_media_narrow = 2130903110; // aapt resource value: 0x7f030047 - public const int notification_template_icon_group = 2130903111; + public const int notification_template_big_media_narrow_custom = 2130903111; // aapt resource value: 0x7f030048 - public const int notification_template_lines_media = 2130903112; + public const int notification_template_custom_big = 2130903112; // aapt resource value: 0x7f030049 - public const int notification_template_media = 2130903113; + public const int notification_template_icon_group = 2130903113; // aapt resource value: 0x7f03004a - public const int notification_template_media_custom = 2130903114; + public const int notification_template_lines_media = 2130903114; // aapt resource value: 0x7f03004b - public const int notification_template_part_chronometer = 2130903115; + public const int notification_template_media = 2130903115; // aapt resource value: 0x7f03004c - public const int notification_template_part_time = 2130903116; + public const int notification_template_media_custom = 2130903116; // aapt resource value: 0x7f03004d - public const int NoYtPlaylist = 2130903117; + public const int notification_template_part_chronometer = 2130903117; // aapt resource value: 0x7f03004e - public const int player = 2130903118; + public const int notification_template_part_time = 2130903118; // aapt resource value: 0x7f03004f - public const int playerInfo = 2130903119; + public const int NoYtPlaylist = 2130903119; // aapt resource value: 0x7f030050 - public const int PlaylistHeader = 2130903120; + public const int player = 2130903120; // aapt resource value: 0x7f030051 - public const int PlaylistList = 2130903121; + public const int playerInfo = 2130903121; // aapt resource value: 0x7f030052 - public const int preference = 2130903122; + public const int PlaylistHeader = 2130903122; // aapt resource value: 0x7f030053 - public const int preference_category = 2130903123; + public const int PlaylistList = 2130903123; // aapt resource value: 0x7f030054 - public const int preference_dialog_edittext = 2130903124; + public const int preference = 2130903124; // aapt resource value: 0x7f030055 - public const int preference_dropdown = 2130903125; + public const int preference_category = 2130903125; // aapt resource value: 0x7f030056 - public const int preference_information = 2130903126; + public const int preference_dialog_edittext = 2130903126; // aapt resource value: 0x7f030057 - public const int preference_list_fragment = 2130903127; + public const int preference_dropdown = 2130903127; // aapt resource value: 0x7f030058 - public const int preference_recyclerview = 2130903128; + public const int preference_information = 2130903128; // aapt resource value: 0x7f030059 - public const int preference_widget_checkbox = 2130903129; + public const int preference_list_fragment = 2130903129; // aapt resource value: 0x7f03005a - public const int preference_widget_seekbar = 2130903130; + public const int preference_recyclerview = 2130903130; // aapt resource value: 0x7f03005b - public const int preference_widget_switch_compat = 2130903131; + public const int preference_widget_checkbox = 2130903131; // aapt resource value: 0x7f03005c - public const int PreferenceContent = 2130903132; + public const int preference_widget_seekbar = 2130903132; // aapt resource value: 0x7f03005d - public const int Preferences = 2130903133; + public const int preference_widget_switch_compat = 2130903133; // aapt resource value: 0x7f03005e - public const int PreferenceToolbar = 2130903134; + public const int PreferenceContent = 2130903134; // aapt resource value: 0x7f03005f - public const int QuickPlayLayout = 2130903135; + public const int Preferences = 2130903135; // aapt resource value: 0x7f030060 - public const int RecyclerFragment = 2130903136; + public const int PreferenceToolbar = 2130903136; // aapt resource value: 0x7f030061 - public const int SaveAPlaylist = 2130903137; + public const int QuickPlayLayout = 2130903137; // aapt resource value: 0x7f030062 - public const int search_layout = 2130903138; + public const int RecyclerFragment = 2130903138; // aapt resource value: 0x7f030063 - public const int SeekbarPreference = 2130903139; + public const int SaveAPlaylist = 2130903139; // aapt resource value: 0x7f030064 - public const int select_dialog_item_material = 2130903140; + public const int search_layout = 2130903140; // aapt resource value: 0x7f030065 - public const int select_dialog_multichoice_material = 2130903141; + public const int SeekbarPreference = 2130903141; // aapt resource value: 0x7f030066 - public const int select_dialog_singlechoice_material = 2130903142; + public const int select_dialog_item_material = 2130903142; // aapt resource value: 0x7f030067 - public const int SmallPlayer = 2130903143; + public const int select_dialog_multichoice_material = 2130903143; // aapt resource value: 0x7f030068 - public const int SongList = 2130903144; + public const int select_dialog_singlechoice_material = 2130903144; // aapt resource value: 0x7f030069 - public const int SquareSong = 2130903145; + public const int SmallPlayer = 2130903145; // aapt resource value: 0x7f03006a - public const int support_simple_spinner_dropdown_item = 2130903146; + public const int SongList = 2130903146; // aapt resource value: 0x7f03006b - public const int tabs = 2130903147; + public const int SquareSong = 2130903147; // aapt resource value: 0x7f03006c - public const int TimerLayout = 2130903148; + public const int support_simple_spinner_dropdown_item = 2130903148; // aapt resource value: 0x7f03006d - public const int tooltip = 2130903149; + public const int tabs = 2130903149; // aapt resource value: 0x7f03006e - public const int TwoLineLayout = 2130903150; + public const int TimerLayout = 2130903150; // aapt resource value: 0x7f03006f - public const int ViewPager = 2130903151; + public const int tooltip = 2130903151; // aapt resource value: 0x7f030070 - public const int YtList = 2130903152; + public const int TwoLineLayout = 2130903152; + + // aapt resource value: 0x7f030071 + public const int ViewPager = 2130903153; + + // aapt resource value: 0x7f030072 + public const int YtList = 2130903154; static Layout() { diff --git a/MusicApp/Resources/layout/LineSong.xml b/MusicApp/Resources/layout/LineSong.xml new file mode 100644 index 0000000..143faee --- /dev/null +++ b/MusicApp/Resources/layout/LineSong.xml @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/MusicApp/Resources/layout/LineSongs.xml b/MusicApp/Resources/layout/LineSongs.xml new file mode 100644 index 0000000..a40d70d --- /dev/null +++ b/MusicApp/Resources/layout/LineSongs.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file