操作栏Selet全部/剪切/复制不显示警报对话框 [英] Action Bar Selet All/Cut/Copy not showing for alert dialog

查看:229
本文介绍了操作栏Selet全部/剪切/复制不显示警报对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

操作栏全选/剪切/复制未显示在警报对话框的EditText(图2),请帮助

编辑:
在code是

 查看= MainActivity.this.getLayoutInflater()。膨胀(
                    R.layout.custom_dialog,NULL);
            AlertDialog.Builder alertDialogBu​​ilder =新AlertDialog.Builder(
                    MainActivity.this);
            alertDialogBu​​ilder.setView(视图);
            alertDialogBu​​ilder.setPositiveButton(添加,
                    新DialogInterface.OnClickListener(){
                        公共无效的onClick(DialogInterface对话框,
                                INT whichButton){                        }
                    });
            alertDialogBu​​ilder.setNegativeButton(取消,
                    新DialogInterface.OnClickListener(){
                        公共无效的onClick(DialogInterface对话框,
                                INT whichButton){
                        }
                    });
            对话D = alertDialogBu​​ilder.create();
            d.show();


解决方案

什么API级别是从第2屏幕截图?

潜在的答案在这里:<一href=\"http://stackoverflow.com/questions/10386084/how-do-i-enable-standard-copy-paste-for-a-textview-in-android\">How做我启用对Android的一个TextView标准复制粘贴?

阅读emil10001的评论。

Action Bar Select All/Cut/Copy not showing for EditText in Alert dialog(picture 2),Kindly help

Edit: the code is

            View view = MainActivity.this.getLayoutInflater().inflate(
                    R.layout.custom_dialog, null);
            AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
                    MainActivity.this);
            alertDialogBuilder.setView(view);
            alertDialogBuilder.setPositiveButton("Add",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int whichButton) {

                        }
                    });
            alertDialogBuilder.setNegativeButton("Cancel",
                    new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog,
                                int whichButton) {
                        }
                    });
            Dialog d = alertDialogBuilder.create();
            d.show();

解决方案

What API level is the 2nd screen cap from?

Potential answer here: How do I enable standard copy paste for a TextView in Android?

Read emil10001's comment.

这篇关于操作栏Selet全部/剪切/复制不显示警报对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆