开发者

How to retrieve ImageUri of an ImageView?

开发者 https://www.devze.com 2022-12-29 12:46 出处:网络
I\'m looking forward the method for accessing the c开发者_StackOverflow中文版urrent image\'s Uri from an ImageView, to save it to my database, but i\'ve only found the setter.

I'm looking forward the method for accessing the c开发者_StackOverflow中文版urrent image's Uri from an ImageView, to save it to my database, but i've only found the setter.

Where's the getter??


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.

0

精彩评论

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