在动作条的文本选择工具是白色的白色背景上的对话框中选择文本后(Text selection tool

2019-09-27 03:00发布

没有人有这个问题,在对话框的EditText上选择文本之后,工具栏与无形的动作按钮出现(白色背景上的白色)?

如何设置主题为DialogFragment?

Answer 1:

你可以在styles.xml定制对话框主题:

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

然后用MyDialogThemeDialogFragment


UPDATE

在你的对话框使用下列代码设置自定义主题:

ContextThemeWrapper context = new ContextThemeWrapper(getActivity(), R.style.MyDialogTheme);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
... ...


文章来源: Text selection tools in ActionBar are white on white background after selecting text in Dialog