I am trying to set the android Theme.Light theme for my alert dialog, but with no success so far. After reading a few tutorials I gathered that using Al
This took me a while to figure out as well.
The issue at hand is that Theme.Light and Theme.Holo.Light and such are designed around the activity. A dialog theme needs to be based around a theme such as @android:style/Theme.Dialog which contains properties specific to dialogs.
<style name="popup_theme" parent="@android:style/Theme.Dialog">
Try overriding the Theme.Dialog using things like:
<item name="android:textAppearance">?android:attr/textAppearanceInverse</item>
parent="android:style/Theme.Light"
Try this:
<style name="popup_theme" parent="Theme.AppCompat.Light.Dialog.Alert">
This is what I did. And it worked for me
AlertDialog.Builder builder = new AlertDialog.Builder(context,R.style.Theme_AppCompat_Light_Dialog);
change parent="android:Theme.Light"
to parent="@android:style/Theme.Light"