// public static void Launch(Android.App.Activity activity, int aid, String imgUrl) // { // Intent intent = new Intent(activity, typeof(VideoDetailsActivity));//.class); // intent.AddFlags(ActivityFlags.NewTask);// Intent.FLAG_ACTIVITY_NEW_TASK); // intent.PutExtra(ConstantUtil.EXTRA_AV, aid); // intent.PutExtra(ConstantUtil.EXTRA_IMG_URL, imgUrl); // activity.StartActivity(intent); // } public void finishTask() { mFAB.Clickable = true;// setClickable(true); Color mFAB_color = new Color(Resource.Color.colorPrimary); mFAB.BackgroundTintList = ColorStateList.ValueOf(mFAB_color); //SetBackgroundTintList( // ColorStateList.valueOf(getResources().getColor(R.color.colorPrimary))); mCollapsingToolbarLayout.Title = "";//.setTitle(""); if (Android.Text.TextUtils.IsEmpty(imgUrl)) { //Glide.with(VideoDetailsActivity.this) // .load(mVideoDetailsInfo) // .centerCrop() // .diskCacheStrategy(DiskCacheStrategy.ALL) // .placeholder(R.drawable.bili_default_image_tv) // .dontAnimate() // .into(mVideoPreview); } VideoIntroductionFragment mVideoIntroductionFragment = VideoIntroductionFragment.newInstance(av); //VideoCommentFragment mVideoCommentFragment = VideoCommentFragment.newInstance(av); var accountFragment = new FragmentAccount(); var homeFragment = new FragmentHome(); fragments.Add(mVideoIntroductionFragment); fragments.Add(homeFragment); //SetPagerTitle(mVideoDetailsInfo.getData().getStat().getReply().ToString());// String.valueOf(mVideoDetailsInfo.getStat().getReply())); SetPagerTitle("123"); }
private void InitAdapter() { var accountFragment = new FragmentAccount(); var homeFragment = new FragmentHome(); fragments.Add(accountFragment); fragments.Add(homeFragment); _pager.Adapter = null; var oldAdapter = _adapter; _adapter = null;// _useAdapter2 ? new MyPagerAdapter2(this, SupportFragmentManager) : new MyPagerAdapter(SupportFragmentManager); _pager.Adapter = _adapter; _tabs.SetViewPager(_pager); //have to dispose it after we've set the view pager, otherwise an error occurs because we've dumped out //the Java Reference. if (oldAdapter != null) { oldAdapter.Dispose(); } }