我在appCompat 22.2.1的DialogFragment里面使用AlertDialog来做类似下面的事情。AlertDialog自定义EditText查看和复制粘贴菜单
但你可以告诉复制粘贴菜单功能是相当混乱。我能做些什么来将复制粘贴菜单栏从后台移到前台?另外我怎样才能改变“粘贴”标签的颜色?
这是我的对话框
<style name="MyDialogStyle" parent="Theme.AppCompat.Dialog.Alert">
<!-- Used for the buttons -->
<item name="colorAccent">@color/blue_500</item>
<item name="colorControlNormal">@color/blue_500</item>
<!-- Used for the title and text -->
<item name="android:textColorPrimary">@color/grey_200</item>
<!-- Used for the background -->
<item name="android:background">@color/dark_gray</item>
</style>
和我的对话码内的DialogFragment
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState)
{
final AlertDialog.Builder alertCompat = new AlertDialog.Builder(getActivity(), R.style.MyDialogStyle);
alertCompat.setTitle("Hello wtf");
alertCompat.setView(R.layout.add_mac_dialog_frag);
alertCompat.setPositiveButton(R.string.ok, this);
alertCompat.setNegativeButton(R.string.cancel, this);
return alertCompat.create();
任何想法XML风格?
啊谢谢很多信息。我想我们将不得不等待更新 – ThanosFisherman