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?
Asked
Active
Viewed 619 times
1
-
Do you have to use a floating dialog for medium devices? This may lead to some inconsistency in your layout. – user3331142 Jul 01 '14 at 11:57
1 Answers
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