سؤال

I have used the photoview from Chris Banes opensource photoview library alongwith the Universal Imager Loader library inside a ViewPager to make a gallery application. The problem is that when I try to delete an image, the image file from the sdcard is deleted, the associated data list is updated, and when I call the notifyDataSetChagned(), nothing happens, the view remains inside the pager and not changed.

Overriding getItemPosition() and returning POSITION_NONE returns an error from the PhotoAttacher saying: E/AndroidRuntime(18407): java.lang.IllegalStateException: ImageView no longer exists. You should not use this PhotoViewAttacher any more.

and without that, as I mentioned, there is no change. Any ideas?

Heres the link to the code:

http://pastie.org/private/ezvnfcdi6iicosxys1c5g

هل كانت مفيدة؟

المحلول

Instead of using an ImageView and attaching a PhotoViewAttacher on it, I just used uk.co.senab.photoview.PhotoView in place of ImageView in the xml layout and it worked.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top