private void SetVideoPlayerFragmentAdapters() { try { TabLayoutView = FindViewById <TabLayout>(Resource.Id.tabs); ViewPagerView = FindViewById <ViewPager>(Resource.Id.viewPager); TabAdapter = new MainTabAdapter(SupportFragmentManager); TabVideosComment = new VideosCommentFragment(); TabVideosAbout = new VideosAboutFragment(); TabAdapter.AddFragment(TabVideosAbout, GetString(Resource.String.Lbl_About)); TabAdapter.AddFragment(TabVideosComment, GetString(Resource.String.Lbl_Comment)); ViewPagerView.CurrentItem = 2; ViewPagerView.OffscreenPageLimit = TabAdapter.Count; ViewPagerView.Adapter = TabAdapter; TabLayoutView.SetupWithViewPager(ViewPagerView); TabLayoutView.SetTabTextColors(AppSettings.SetTabDarkTheme ? Color.White : Color.Black, Color.ParseColor(AppSettings.MainColor)); } catch (Exception e) { Console.WriteLine(e); } }
private void DestroyBasic() { try { RewardedVideoAd?.OnDestroy(this); TabLayoutView = null; ViewPagerView = null; TabAdapter = null; TabVideosComment = null; TabVideosAbout = null; RewardedVideoAd = null; } catch (Exception e) { Console.WriteLine(e); } }
private void DestroyBasic() { try { RewardedVideoAd?.OnDestroy(this); TabLayoutView = null !; ViewPagerView = null !; TabAdapter = null !; TabVideosComment = null !; TabVideosAbout = null !; RewardedVideoAd = null !; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }