0

How can I make the image in the ImageView appear in the Alert Dialog? Note that I didnt use any listview.. its just a simple image in the screen using imageview and when I click that image it will open in alert dialog with that same image appearing..

I want the current image to appear in the dialog box when click the image us clicked.. not the image you set in xml..

  • https://stackoverflow.com/questions/6276501/how-to-put-an-image-in-an-alertdialog-android – Klemikaze Mar 20 '21 at 16:59
  • Its not working.. I want the current image that is clicked to appear.. Not the image you set in the xml.. – Gulzan Nanilignap Mar 20 '21 at 17:24
  • I would try to use standard functionality, so I would use the answer provided and then in onClick event handler I would use something like:(ImageView)findViewById(R.id.dialog_imageview).... setImageResource(...)/setImageDrawable(...)... https://stackoverflow.com/questions/2974862/changing-imageview-source – Klemikaze Mar 20 '21 at 17:35

0 Answers0