您好我正在使用以下代码显示警告对话框
final CharSequence [] items = {“Email”,“Phone”}; AlertDialog.Builder builder = new AlertDialog.Builder(this);
但是我想显示带有这些名字的图标。对于上面代码中的x,我正在接收电子邮件,而phone.emailIcon则带有电子邮件名称。 为此我能做些什么给我一些建议。谢谢你提前
答案 0 :(得分:0)
可以为字符串添加自定义适配器和自定义视图,请查看此链接以获取示例:
http://mgmblog.com/2010/06/10/arrayadapter-and-alertdialog-for-single-choice-items/