Search code examples
androidandroid-alertdialogandroid-themeandroid-dialogfragment

Dark text on dark background on AlertDialog with Theme.Sherlock.Light


I'm using Theme.Sherlock.Light theme for my application and I'm creating a DialogFragment with an underlying AlertDialog. It works just fine on Android 3.x and 4.x, but on Android 2.x I see dark text on dark background, which is hardly readable. Am I doing something wrong and do I need to force light background by creating a custom style? Thanks in advance.


Solution

  • I found solution here:

    builder.setInverseBackgroundForced(true)
    

    Also, as I see here, Jake Warton suggests fix it by the same way and he doesn't know any better solution because of AlertDialogs implementation.