0
在我的应用程序中,我正在下载一个小型Facebook个人资料图片并将其显示在AlertDialog
(作为BitmapDrawable
)以及用户名和姓氏。现在Android - AlertDialog不会显示BitmapDrawable
,我的问题是,在某些设备上的BitmapDrawable
在AlertDialog
所示(安卓4.0〜)和一些它不是(5.0及以上),但在所有的设备进行BitmapDrawable
包含正确的位图和例如,我可以将BitmapDrawable
加载到ImageView
。
((ImageView)findViewById(R.id.imageView3)).setImageDrawable(bitmapDrawable); //Shown in the ImageView on all devices
AlertDialog ad = new AlertDialog.Builder(MainActivity.this)
.setTitle("From: " + name + " " + lastName)
.setMessage(theStr)
.setNeutralButton(theStr2, new myClick(marker, thePack))
.setIcon(bitmapDrawable) //Not shown in the AlertDialog on all devices
.show();
有什么想法吗?
UPDATE:即使在调试器,我可以看到的图标,AlertDialog
设置和调试器还允许我以查看它的位图,它的完美显示。它只是不会出现在对话框中,我不知道为什么。
接受为您发布的bug报告包含解决方案(这更是一个解决办法) – user2162550