Text selection tools in ActionBar are white on whi

2019-08-10 04:28发布

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

1条回答
家丑人穷心不美
2楼-- · 2019-08-10 04:46

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);
... ...
查看更多
登录 后发表回答