**TL;DR** Does anyone know why `Android.App.DialogFragment` is obsolete in Xamarin and, more importantly, what class is recommended instead?

**More Info:**

I'm getting the following warnings in my Xamarin.Android app:

> 
> Warning CS0618 'DialogFragment' is obsolete: 'This class is obsoleted in this android platform'
>  Warning CS0618 'Activity.FragmentManager' is obsolete: 'deprecated'
> 
> 
> 

from the following code:

```
using Android.App;

void onClick(int pos) {
    DialogFragment newFragment = new UsernameDialogFragment(_scans[pos]);
    newFragment.Show(_activity.FragmentManager, "dialog");
}

public class UsernameDialogFragment : DialogFragment {
    public override Dialog OnCreateDialog(Bundle savedInstanceState) {
        var builder = new AlertDialog.Builder(Activity);
        // Build the dialog...
        return builder.Create();
    }
}

```

Note that I am using the `Android.App.DialogFrament` class, not the one in `Android.Support.V4.App`. The `onClick` method is part of a `RecyclerView.Adapter`. 

What is so frustrating to me about Xamarin issues like this is that there is almost never sufficient documentation. The IntelliSense warnings don't recommend an alternative API, a Google search for "DialogFrament is obsolete" turns up nothing Xamarin-related except [this old](https://forums.xamarin.com/discussion/60208/an-obsotelete-problem-in-select-date-recipe) forum post recommending to *use* the obsolete API, and worst of all, the `DialogFragment` [API documentation](https://developer.xamarin.com/api/type/Android.App.DialogFragment/) doesn't even show that the class is obsolete!

Some version info:

Xamarin.Forms NuGet: v3.1.0.697729  

Visual Studio 2017: v15.8.1  

Target Framework: Android 9.0 (P)  

Minimum Android version: Android 5.0 (API Level 21 - Lollipop)  

Target Android version: Android 9.0 (API Level 27 - Oreo)