i created dialog fragment and i want when user click the button the dialog fragment show list view , how can i do this ?
I have a similar problem here https://forums.xamarin.com/discussion/95546/how-to-add-a-fragment-in-customadapter#latest.
Did you find a solution ?
To show a fragment, it typically looks like the following:
var transaction = FragmentManager.BeginTransaction();
var fragment = new MyFragment();
You will want to have a layout container that you'd like the fragment to replace, I use a utility function like so (named better ):
public static Fragment ShowMyFragment(FragmentManager manager, int containerId, string tagId)
var ft = manager.BeginTransaction();
// remove existing copies of fragment
var prev = manager.FindFragmentByTag(tagId);
if (prev != null)
var fragment = MyFragment.NewInstance(containerId, tagId);
ft.Replace(containerId, fragment, tagId);
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies