Hi,
I have an activity that loads and displays images from the SDCard. I
create a new AVD, specify the desired image of the sd card (which has
all my pictures already loaded), specify that AVD for deployment, and
start the application. I noticed a strange behavior. At first, the
images are not loaded; the getView method is never called, although
the constructor of my adapter is called. If I close the application,
and open the Gallery app that comes pre-installed, I see that the sd
card folder has the correct number of images, and it 'displays' the
first four. If I start my application again, those four images are
displayed, and only those. If I go back to the Gallery application,
open the sd card folder so that it loads all images, and restart my
application, all images are successfully displayed. Any reason why
this happens? I am using version 1.6, and (part of) my code is below:
[code]
// Set up an array of the Thumbnail Image ID column we want
String[] projection = {MediaStore.Images.Thumbnails._ID};
// Create the cursor pointing to the SDCard
cursor = managedQuery
( MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,
projection,
null,
null,
MediaStore.Images.Thumbnails.IMAGE_ID);
// Get the column index of the Thumbnails ID
columnIndex = cursor.getColumnIndexOrThrow
(MediaStore.Images.Thumbnails._ID);
sdcardImages = (GridView) findViewById(R.id.sdcard);
//new LoadImagesFromSDCard().execute();
imageAdapter = new ImageAdapter(getApplicationContext());
sdcardImages.setAdapter(imageAdapter);
[/code]
Thank you,
Mihai Fonoage
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---