Hello.
I am using a public class CustomAdapter :BaseAdapter class.
When I try to add a fragment to one of the button.click event i get this error
Do I have to install Xamarin.Android.Support.v4.AppCompat or there is another problem ?
I have already installed Xamarin.Android.Support.v7.AppCompat ?
This is my fragment class
public class Edit_Fragment :DialogFragment
{
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
return base.OnCreateView(inflater, container, savedInstanceState);
var view = inflater.Inflate(Resource.Layout.EditFragment, container, false); return view; } }
I found the solution.
It must be
FragmentTransaction trans = ((Activity)_mContex).FragmentManager.BeginTransaction();
EditFragment fragment = new EditFragment();
fragment.Show(trans, "edit fragment");
Answers
I found the solution.
It must be
FragmentTransaction trans = ((Activity)_mContex).FragmentManager.BeginTransaction();
EditFragment fragment = new EditFragment();
fragment.Show(trans, "edit fragment");