After a little research, I think this is not an ActionBarScherlock problem, but the Light Theme problem in the warning dialogs. Try a few things:
Using:
final AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(activity, R.style.AppTheme_LightDialog));
Edit:
<style name="AppTheme_LightDialog" parent="@android:style/Theme.Light">
To:
<style name="AppTheme_LightDialog" parent="@android:style/Theme.Dialog">
Then override the default styles "Theme.Dialog" (copied to the Android git tree):
<style name="AppTheme_LightDialog" parent="@android:style/Theme.Dialog"> <item name="android:windowFrame">@null</item> <item name="android:windowTitleStyle">@android:style/DialogWindowTitle</item> <item name="android:windowBackground">@android:drawable/panel_background</item> <item name="android:windowIsFloating">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> </style>
You may need to copy the source resources (@android: style / DialogWindowTitle, @android: style / Animation.Dialog and @android: drawable / panel_background) to your project.
And finally, the hard part ( from Shawn Castrianni ), since it seems Android needs additional help to properly apply the style to the AlertDialog text. Add "AppTheme_LightDialog" to your style:
<item name="android:textColor">?android:attr/textColorPrimaryInverseDisableOnly</item>
UPDATE:
Before cell text, the style doesn't seem to apply to AlertDialogs. The above code gives you a solution for> = cellular devices. There is interesting work to make it work on these devices too (check this and this ), but you can start asking if you prefer a different approach that requires less work.
By the way, I'm not sure if this is your business, but it is important that you also use the same ContextThemeWrapper if you are inflating a custom layout for AlertDialog. For instance,
Edit:
View view = View.inflate(activity, R.layout.myDialog, null);
To:
View view = View.inflate(new ContextThemeWrapper(activity, R.style.AppTheme_LightDialog), R.layout.myDialog, null);