Is it possible to make the dialogue open on the tablet as a normal android dialogue, and on the phone as a separate activation? That is the same principle as with the fragments. And then I have a dialogue with a complex interface. It looks good on the tablet, but not on the phone.

    2 answers 2

    Your case is simply to catch the screen resolution and respond accordingly. If the tablet - to show the dialogue, if not - to show the activation. Something like this. Or, try as described here. Clicking on a fragment in the case of a phone will activate a new dialogue in the case of a tablet (i.e., update the fragment).

    Of course, I am sure there are other ways.

      I would make it much easier, namely, to emulate a dialogue of activations. As I understand the question is that the dialogue is small and it seems bad on the screen, depending on the device. It is necessary to stupidly expand the dialogue to full screen, something like this:

      @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.my_dialog); this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } 
      • It is worth a try! - angry
      • @Barmaley, for some reason this method did not work for me. What is R.layout.my_dialog ? Or what else could be the problem? - angry
      • @ Daria R.layout.my_dialog is the layout of your dialogue. The author clearly shows that you need to call a method that expands the dialogue to full screen in the same place where you create the layout for the dialogue. - Andrew Grow