Dialog Fragments for Older Android

Although the hope is that all older phones will upgrade to Ice Cream Sandwich and therefore be able to take advantage of all the wonderfulness of dialog fragments, the reality is that some older models will stay on Android 1.6, 2.1, and 2.2. To provide dialog fragment support for these phones, Google provides the Fragment Compatibility library. For dialog fragments, you use the same DialogFragment class discussed earlier; just make sure you include the compatibility jar file in your application.

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.