private void SetDataPlaylist() { try { PlaylistObject = JsonConvert.DeserializeObject <PlaylistDataObject>(Intent.GetStringExtra("ItemData") ?? ""); if (PlaylistObject != null) { PathImage = ""; GlideImageLoader.LoadImage(this, PlaylistObject.ThumbnailReady, PlaylistImage, ImageStyle.CenterCrop, ImagePlaceholders.Drawable); NameEditText.Text = PlaylistObject.Name; if (PlaylistObject.Privacy == 0) { RbPublic.Checked = true; RbPrivate.Checked = false; Status = "0"; } else { RbPublic.Checked = false; RbPrivate.Checked = true; Status = "1"; } } } catch (Exception e) { Console.WriteLine(e); } }
private void SetDataPlaylist() { try { PlaylistId = Arguments.GetString("PlaylistId") ?? ""; if (!string.IsNullOrEmpty(PlaylistId)) { PlaylistObject = JsonConvert.DeserializeObject <PlaylistDataObject>(Arguments.GetString("ItemData") ?? ""); if (PlaylistObject != null) { CollapsingToolbar.Title = PlaylistObject.Name; TxtNamePlaylist.Text = PlaylistObject.Name; TxtPublisherName.Text = PlaylistObject?.Publisher != null?Context.GetText(Resource.String.Lbl_By) + " " + DeepSoundTools.GetNameFinal(PlaylistObject?.Publisher.Value.PublisherClass) : Context.GetText(Resource.String.Lbl_By) + " " + Context.GetText(Resource.String.Lbl_Unknown); if (InfoPlaylistViewPager.Adapter == null) { PlaylistViewPager = new PlaylistViewPager(Activity, PlaylistObject); InfoPlaylistViewPager.Adapter = PlaylistViewPager; InfoPlaylistViewPager.CurrentItem = 0; CircleIndicator.SetViewPager(InfoPlaylistViewPager); } InfoPlaylistViewPager.Adapter.NotifyDataSetChanged(); } StartApiService(); } } catch (Exception e) { Console.WriteLine(e); } }
public PlaylistViewPager(Activity context, PlaylistDataObject playlistList) { try { ActivityContext = context; PlaylistList = new ObservableCollection <PlaylistDataObject> { playlistList, playlistList }; Inflater = LayoutInflater.From(context); } catch (Exception e) { Console.WriteLine(e); } }
private void SetDataPlaylist() { try { PlaylistId = Arguments.GetString("PlaylistId") ?? ""; if (!string.IsNullOrEmpty(PlaylistId)) { PlaylistObject = JsonConvert.DeserializeObject <PlaylistDataObject>(Arguments.GetString("ItemData") ?? ""); if (PlaylistObject != null) { Glide.With(this).AsBitmap().Apply(GlideRequestOptions).Load(PlaylistObject.ThumbnailReady).Into(DiskImage); Glide.With(this).AsBitmap().Load(PlaylistObject.ThumbnailReady).Into(CoverImage); var d = PlaylistObject.Name.Replace("<br>", ""); TxtNamePlaylist.Text = Methods.FunString.SubStringCutOf(Methods.FunString.DecodeString(d), 70); TxtPublisherName.Text = PlaylistObject?.Publisher != null?Context.GetText(Resource.String.Lbl_By) + " " + DeepSoundTools.GetNameFinal(PlaylistObject?.Publisher.Value.PublisherClass) : Context.GetText(Resource.String.Lbl_By); if (!string.IsNullOrEmpty(PlaylistObject.Songs.ToString())) { TxtSongCount.Text = PlaylistObject.Songs + " " + GetText(Resource.String.Lbl_Songs); } else { TxtSongCount.Text = GetText(Resource.String.Lbl_Songs); } } StartApiService(); } } catch (Exception e) { Console.WriteLine(e); } }