1

Anyone had this issue, that after selecting text in dialog's EditText, toolbar appears with invisible action buttons (white on white background)?

How do I set theme to a DialogFragment?

Can't see text selection tools in action bar

ViliusK
  • 11,345
  • 4
  • 67
  • 71

1 Answers1

2

You can custom dialog theme in styles.xml:

<style name="MyDialogTheme" parent="android:Theme.Holo.Dialog" />   

then use MyDialogTheme in your DialogFragment


UPDATE

In your dialog use following codes to set custom theme:

ContextThemeWrapper context = new ContextThemeWrapper(getActivity(), R.style.MyDialogTheme);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
... ...
Xcihnegn
  • 11,579
  • 10
  • 33
  • 33
  • Setting style with `dialog.setStyle(DialogFragment.STYLE_NORMAL, R.style.MyDialogTheme);` does not give any effect. :( – ViliusK Feb 12 '15 at 08:39