SD カードに保存されているすべての画像をギャラリー ビューで表示しようとしています。
コンテンツ プロバイダー (android.provider.MediaStore.images.Media クラス) を使用してみましたが、途中で行き詰まるようです。これがその方法であるかどうかはわかりません。
これまでの私のコードは次のとおりです。
String[] colsNeeded = new String[]{Media._ID, Media.TITLE};
Uri mMedia = Media.EXTERNAL_CONTENT_URI;
//Create a cursor using the URI & column names needd
Cursor c = managedQuery(mMedia, colsNeeded, null, null, Media.DATE_TAKEN + " ASC");
//What kind of adapter should I create here
//that contains images from the cursor??
SpinnerAdapter sa = null; //This is the point I get stuck
//Set the adapter of the gallery view
Gallery galleryPetPhotos = (Gallery)findViewById(R.id.GalleryPetPhotos);
galleryPetPhotos.setAdapter(sa);
正しい方向に微調整していただければ幸いです。