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

Dialogs have not shadow #67

Closed javagc closed 10 years ago

javagc commented 10 years ago

I used this library but my dialogs have not shadow . It is here

trip

Can you help me?

davidvavra commented 10 years ago

Hi, please show us your code where you define a theme for dialogs.

javagc commented 10 years ago

There is code

    <item name="dialogBackground">@color/tt_gray_2</item>
    <item name="titleTextColor">@color/tt_light_blue</item>
    <item name="titleSeparatorColor">@color/sdl_button_separator_dark</item>
    <item name="messageTextColor">@color/sdl_message_text_dark</item>
    <item name="buttonTextColor">@color/sdl_button_text_dark</item>
    <item name="buttonSeparatorColor">@color/sdl_button_separator_dark</item>
    <item name="buttonBackgroundColorNormal">@color/sdl_button_normal_dark</item>
    <item name="buttonBackgroundColorPressed">@color/tt_gray_1</item>
    <item name="buttonBackgroundColorFocused">@color/tt_gray_1</item>
    <item name="android:windowBackground">@drawable/shadow</item>
davidvavra commented 10 years ago

It's not a full code - do you inherit from DialogStyleDark or DialogStyleLight?

javagc commented 10 years ago
``` ```
davidvavra commented 10 years ago

Thanks, I think dialogBackground needs to be a drawable, not color. And I would experiment with windowBackground as well - never used it, I don't know what consequences it will have.

tomas-vondracek commented 10 years ago

android:windowBackground is what defines the shadow in this case, it's suppose to be something like this: dialog_full_holo_light 9 We don't set this attribute in library, system resource is used by default.