问题
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?
回答1:
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);
... ...
来源:https://stackoverflow.com/questions/28459898/text-selection-tools-in-actionbar-are-white-on-white-background-after-selecting