在对话框中选择文本后,ActionBar中的文本选择工具是白色背景上的白色 [英] Text selection tools in ActionBar are white on white background after selecting text in Dialog
本文介绍了在对话框中选择文本后,ActionBar中的文本选择工具是白色背景上的白色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都有此问题,在对话框的EditText中选择文本后,工具栏会显示不可见的操作按钮(白色背景上的白色)?
Anyone had this issue, that after selecting text in dialog's EditText, toolbar appears with invisible action buttons (white on white background)?
如何将主题设置为一个DialogFragment?
How do I set theme to a DialogFragment?
推荐答案
您可以在styles.xml中自定义对话框主题:
You can custom dialog theme in styles.xml:
<style name="MyDialogTheme" parent="android:Theme.Holo.Dialog" />
然后使用 MyDialogTheme
$ c> DialogFragment
then use MyDialogTheme
in your DialogFragment
更新
在您的对话框中,使用以下代码设置自定义主题:
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);
... ...
这篇关于在对话框中选择文本后,ActionBar中的文本选择工具是白色背景上的白色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文