avast / android-styled-dialogs

Backport of Material dialogs with easy-to-use API based on DialogFragment
Apache License 2.0
2.15k stars 450 forks source link

Dialog drop shadows missing w/ v7-appcompat and v4-preferencefragment? #27

Closed justingarrick closed 10 years ago

justingarrick commented 10 years ago

Can anyone help me figure out why dialog "drop shadows" around the edges of the dialog don't appear when using android-styled-dialogs conjunction with the following libraries?

There is a sample application setup that demonstrates this issue @ https://github.com/justingarrick/sdltest. Both of the aforementioned libraries need to be available and added as Android Libraries in addition to android-styled-dialogs.

The normal dialogs spawned by android-support-v4-preferencefragment have the shadow:
correct

However, when a custom dialog using andrid-styled-dialogs is launched, the shadow is missing and everything feels flat: incorrect

davidvavra commented 10 years ago

I have looked into your code.

The problem is this:

<style name="MyCustomDialogStyle" parent="Theme.AppCompat.Light">
    <item name="titleTextColor">#FFFFFF</item>
</style>

Your parent is Theme.AppCompat.Light, but you need to extend DialogStyleLight

justingarrick commented 10 years ago

That was the correct solution, my style inheritance was incorrect. Thanks @destil!