Text selection tools in ActionBar are white on white background after selecting text in Dialog

半世苍凉 提交于 2019-12-24 11:37:14

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!