1

I have to show some content as a fullscreen activity on smaller devices(nexus 4), as a floating dialog on medium sized devices (nexus 7) and inside one of the fragments of the two pane view on larger devices(nexus 10). What is the best way to cater to all the three screen sizes?

Yagna
  • 423
  • 1
  • 5
  • 15

1 Answers1

3

The best way is probably implement it as a DialogFragment. You should inflate your layout in OnCreateView and let OnCreateDialog return null. Then you can use is as regular fragment in activity, as dialog for medium sized devices and as nested fragment for large ones.

Roman Zhilich
  • 145
  • 1
  • 5