Android - при вызове botomsheetDialogFragment получить ошибку

Проблем с операцией нет, но в Logcat есть ошибка.

вот мой код

Fragment.java (фрагмент)

public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

     .
     .
     .
    
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {

            Custom_Dialog custom_dialog = new Custom_Dialog ();

            comm_dialog.show(getFragmentManager(), "custom_dialog");

        }
    });

     .
     .
     .

}

Нижний лист DialogFragment

public class Cusctom_Dialog extends BottomSheetDialogFragment {


  @Nullable
  @Override
  public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {

    View view = inflater.inflate(R.layout.custom_dialog, null);

    return view;
  }   
}

LogCat

2020-11-19 12:19:21.537 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.553 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.571 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.587 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.604 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.620 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.637 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.654 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.671 25475-25475/com.playhead.ddn E/DecorView: mWindow.mActivityCurrentConfig is null
2020-11-19 12:19:21.704 25475-25475/com.playhead.ddn E/ViewRootImpl: sendUserActionEvent() mView returned.

Простой код, но я постоянно получаю ошибки, когда закрываю диалог с помощью свайпа. То же самое и с диалогом вызова.

В чем проблема?

0 ответов

Другие вопросы по тегам