code: public void show() {
          if (mRecyclerView.getLayoutManager() == null) {
              mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
          }
          initAdapterIfNeeded();
          super.show();
      }
docs: Start the dialog and display it on screen.  The window is placed in the
  application layer and opaque.  Note that you should not override this
  method to do initialization when the dialog is shown, instead implement
  that in {@link #onStart}.