/// <summary> /// Start to select photo. /// </summary> /// <param name="requestCode"> identity of the requester activity. </param> public void ForResult(int requestCode) { if (engine == null) { throw new ExceptionInInitializerError(LoadEngine.INITIALIZE_ENGINE_ERROR); } Activity activity = Activity; if (activity == null) { return; // cannot continue; } mSelectionSpec.MimeTypes = MimeTypes; mSelectionSpec.Engine = engine; Intent intent = new Intent(activity, typeof(ImageSelectActivity)); intent.PutExtra(ImageSelectActivity.EXTRA_SELECTION_SPEC, mSelectionSpec); // intent.putExtra(ImageSelectActivity.EXTRA_ENGINE, (Serializable) engine); intent.PutParcelableArrayListExtra(ImageSelectActivity.EXTRA_RESUME_LIST, mResumeList.AsIParcelableList()); Fragment fragment = Fragment; if (fragment != null) { fragment.StartActivityForResult(intent, requestCode); } else { activity.StartActivityForResult(intent, requestCode); } hasInitPicker = false; }
private void ItemView_Click(object sender, System.EventArgs e) { string id = ((ViewGroup)sender).FindViewById <TextView>(Resource.Id.txtRecordId).Text; Intent intent = new Intent(mSupportFragment.Context, typeof(ProductsFragmentAddCategoryOrSizeActivity)); intent.PutExtra("isSize", false); intent.PutExtra("isEdit", true); intent.PutExtra("selectedRecordId", Convert.ToInt32(id)); mSupportFragment.StartActivityForResult(intent, 38); }
private void ParentProduct_Click(object sender, EventArgs e) { if (!GlobalVariables.mIsCheckoutFragmentMultiSizeAddOpened) { GlobalVariables.mIsCheckoutFragmentMultiSizeAddOpened = true; int position = mRecyclerView.GetChildAdapterPosition((View)sender); TextView prodName = mRecyclerView.FindViewHolderForAdapterPosition(position).ItemView.FindViewById <TextView>(Resource.Id.txtProductName); TextView prodId = mRecyclerView.FindViewHolderForAdapterPosition(position).ItemView.FindViewById <TextView>(Resource.Id.txtProductId); GlobalVariables.mCurrentSelectedItemNameMultiSize = prodName.Text; GlobalVariables.mCurrentSelectedItemIdMultiSize = Convert.ToInt32(prodId.Text); Intent intent = new Intent(mSupportFragment.Context, typeof(CheckoutFragmentMultiSizeAdd)); intent.AddFlags(ActivityFlags.NoAnimation); mSupportFragment.StartActivityForResult(intent, 8); //Intent intent = new Intent(mCheckoutContext, typeof(CheckoutFragmentMultiSizeAdd)); //intent.AddFlags(ActivityFlags.NoAnimation); //((Activity)mCheckoutContext).StartActivityForResult(intent, 8); //callback not working used global var instead to prevent double click } }