What are your logs showing?

I was trying to load images into an imageview using file Uris, which
worked great in 2.2, but not on 2.1 and below.  I could never figure
out why.

I posted the question on SO here:
http://stackoverflow.com/questions/3720530/why-would-imageview-setimageuri-work-in-android-2-2-but-not-2-1.



On Sep 24, 10:19 pm, niko001 <ebs...@googlemail.com> wrote:
> [I have asked this question on Stackoverflow, but haven't gotten any
> replies in 2 days]
>
> Hi,
>
> I am using the Gallery3D-Code for a test-app but want it to only
> display images from a sub-folder on the SD, not all of the images that
> are stored on it. To do this, I tried to change
>
> public static final Uri STORAGE_URI =
> Images.Media.EXTERNAL_CONTENT_URI;
>
> to
> public static final String ROOT_DIR =
> Environment.getExternalStorageDirectory().toString() + "/
> mySubDirectory";
> public static final Uri STORAGE_URI = Uri.fromFile(new
> File(ROOT_DIR));
>
> but I guess this is transforming a content://-Uri to a file://-Uri and
> this may be a problem?
>
> In any case, it doesn't work :-(! Instead of just showing images from
> the ROOT_DIR-directory and its sub-directories, it shows no images at
> all ("Gallery empty"). Could anyone point me in the right direction as
> to what I am doing wrong?
>
> Thanks for your help,
> Nick

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to