I get the lint warning, Avoid passing null as the view root when inflating views with null as parent, like:
LayoutInfl
According to https://developer.android.com/guide/topics/ui/dialogs
Inflate and set the layout for the dialog
Pass null as the parent view because its going in the dialog layout
therefore, for creating AlertDialog, I use @SuppressLint("InflateParams")
LayoutInflater inflater = requireActivity().getLayoutInflater();
@SuppressLint("InflateParams")
View view = inflater.inflate(R.layout.layout_dialog, null);
builder.setView(view);