private void CreateDetailsAdapters() { AnimeDetailsPageDetailsTabLeftGenresList.RemoveAllViews(); AnimeDetailsPageDetailsTabLeftGenresList.SetAdapter(new GenresAdapter(_activity, ViewModel.LeftGenres, true)); AnimeDetailsPageDetailsTabRightGenresList.RemoveAllViews(); AnimeDetailsPageDetailsTabRightGenresList.SetAdapter(new GenresAdapter(_activity, ViewModel.RightGenres, true)); AnimeDetailsPageDetailsTabInformationList.RemoveAllViews(); AnimeDetailsPageDetailsTabInformationList.SetAdapter(new DetailsAdapter(_activity, ViewModel.Information, true)); AnimeDetailsPageDetailsTabStatsList.RemoveAllViews(); AnimeDetailsPageDetailsTabStatsList.SetAdapter(new DetailsAdapter(_activity, ViewModel.Stats, true)); AnimeDetailsPageDetailsTabOPsList.RemoveAllViews(); AnimeDetailsPageDetailsTabOPsList.SetAdapter(new GenresAdapter(_activity, ViewModel.OPs, true)); AnimeDetailsPageDetailsTabEDsList.RemoveAllViews(); AnimeDetailsPageDetailsTabEDsList.SetAdapter(new GenresAdapter(_activity, ViewModel.EDs, true)); }
protected override void InitBindings() { Bindings.Add( this.SetBinding(() => ViewModel.LoadingDetails, () => AnimeDetailsPageDetailsTabLoadingOverlay.Visibility).ConvertSourceToTarget(Converters.BoolToVisibility)); Bindings.Add(this.SetBinding(() => ViewModel.LoadingDetails).WhenSourceChanges(() => { if (ViewModel.LoadingDetails) { return; } AnimeDetailsPageDetailsTabLeftGenresList.SetAdapter( ViewModel.RightGenres.GetAdapter(GetSingleDetailTemplateDelegate)); AnimeDetailsPageDetailsTabRightGenresList.SetAdapter( ViewModel.LeftGenres.GetAdapter(GetSingleDetailTemplateDelegate)); AnimeDetailsPageDetailsTabInformationList.SetAdapter( ViewModel.Information.GetAdapter(GetDetailsTemplateDelegate)); AnimeDetailsPageDetailsTabStatsList.SetAdapter(ViewModel.Stats.GetAdapter(GetDetailsTemplateDelegate)); if (ViewModel.AnimeMode) { AnimeDetailsPageDetailsTabOPsList.Visibility = AnimeDetailsPageDetailsTabEDsList.Visibility = AnimeDetailsPageDetailsTabEDsListLabel.Visibility = AnimeDetailsPageDetailsTabOPsListLabel.Visibility = ViewStates.Visible; AnimeDetailsPageDetailsTabOPsList.SetAdapter(ViewModel.OPs.GetAdapter(GetSingleDetailTemplateDelegate)); AnimeDetailsPageDetailsTabEDsList.SetAdapter(ViewModel.EDs.GetAdapter(GetSingleDetailTemplateDelegate)); } else { AnimeDetailsPageDetailsTabOPsList.Visibility = AnimeDetailsPageDetailsTabEDsList.Visibility = AnimeDetailsPageDetailsTabEDsListLabel.Visibility = AnimeDetailsPageDetailsTabOPsListLabel.Visibility = ViewStates.Gone; } })); }