开发者

Alert in android

I am having a bitmap image. Can i show it in开发者_如何学编程 a Alert Dialog in android?


You can create a custom dialog.


you can simply call the AlertDialog.Builder and set your image in there as setIcon(Drawable ) this way you will be able to put up you image on Dialog..


Similar to what Abhinava said, you can also create an ImageView, place your bitmap in there, and send the ImageView to the builder using AlertDialog.Builder.setView(View).

The difference here being that your bitmap will be shown in the content area of the alert dialog instead of in the title.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜