Giter VIP home page Giter VIP logo

Comments (6)

davidvavra avatar davidvavra commented on June 3, 2024

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

from android-styled-dialogs.

javagc avatar javagc commented on June 3, 2024

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>

from android-styled-dialogs.

davidvavra avatar davidvavra commented on June 3, 2024

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

from android-styled-dialogs.

javagc avatar javagc commented on June 3, 2024
<style name="AppBaseTheme" parent="android:Theme.Light">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">

    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
    <item name="sdlDialogStyle">@style/DialogStyleDark.Custom</item>
</style>

<style name="AppTheme.NoActionBar" parent="@style/AppTheme">
    <item name="android:windowActionBar">false</item>
    <item name="android:windowNoTitle">true</item>
</style>

<style name="AppTheme.Dark" parent="@android:style/Theme.Holo.Light.DarkActionBar">
    <item name="android:textColor">@android:color/white</item>
    <item name="sdlDialogStyle">@style/DialogStyleDark.Custom</item>
</style>

<style name="DialogStyleDark.Custom">
    <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>
</style>

from android-styled-dialogs.

davidvavra avatar davidvavra commented on June 3, 2024

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.

from android-styled-dialogs.

tomas-vondracek avatar tomas-vondracek commented on June 3, 2024

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.

from android-styled-dialogs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.