Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve ImageUri of an ImageView?

I'm looking forward the method for accessing the current image's Uri from an ImageView, to save it to my database, but i've only found the setter.

Where's the getter??

like image 476
Clem Avatar asked May 09 '10 15:05

Clem


People also ask

What is ImageView code?

ImageView class is used to display any kind of image resource in the android application either it can be android. graphics. Bitmap or android. graphics.


1 Answers

There is no getter. Since you are the one calling setImageURI(), save the Uri to your database when you call that method.

Bear in mind that ImageViews do not always have a Uri (e.g., drawable resource, generated bitmap), which is why there is no getter.

like image 154
CommonsWare Avatar answered Oct 01 '22 02:10

CommonsWare