afollestad/material-dialogs — pull request #47 by blinkseb (2014-11-19 16:54:04+00:00)
Title: Fix Light theme display on Gingerbread devices. Fix #46

This PR fixes Light theme display on Gingerbread devices, see #46.

On Gingerbread devices, the context is always wrapped inside a ContextThemeWrapper (see https://github.com/android/platform_frameworks_base/blob/gingerbread-release/core/java/android/app/Dialog.java#L139 ). As a result, the custom theme is always overrided with the default dark theme.

As a workaround, use the other constructor of AlertDialog which take a theme resource ID as a second argument.

The second issue was the use of Theme.Holo on pre API 11. I used the correct themes for Gingerbread, and created an new themes files for API 11 which inherits from Holo dialog themes.

Tested on Gingerbread, KitKat and Lollipop with success.