お疲れ様、littleorcです。
多分違います、僕の説明は分かりにくくて、ごめんなさい。
DBなら、SQLiteでアプリのDBとtableを作り、画像ファイル名をtableに保存し、DBから画像名を取得する。
DBから画像名を取得するもできました、それから、ImageViewでこの画像を表示したいです。
例えば、String imageName = "xxxxx";
「BitmapFactoryでどうやって画像を取得すればいいですか?」を聞きたいです。
画像は普通に、res/drawable-mdpiとかの配下に置いてます。
---------------------------------------------
Bitmap bitmap =
BitmapFactory.decodeResource(getResources(),
R.drawable.sample);
ImageView imageView = new ImageView(this);
---------------------------------------------
↑普通の資料見るとこんな感じですよね、だが、「sample」はresourceのIDですよね?普通のString変数とか使えないでしょうか?
説明が下手です、申し訳ありません。
On 8月26日, 午後7:40, mokkouyou <
mokkou...@gmail.com> wrote:
> mokkouyouです。
>
> MediaStore.Images.ImageColumns.DATAはカラム名の定数です。
> ファイル名を取得するついでにパスを取得すればいいのでは?ということになります。
>
> Cursor cursor = MediaStore.Images.Media.query(mResolv,
> MediaStore.Images.Media.EXTERNAL_CONTENT_URI, new String[] {
> MediaStore.Images.ImageColumns._ID,
> MediaStore.Images.ImageColumns.TITLE,
> MediaStore.Images.ImageColumns.DATA }, null, null);
>
> とか。
>
> ひょっとして、
> DB=ContentProviderではなかったりしますか?
> だとしたら見当違いの回答ですいません・・・
>
> 2010年8月26日19:29 littleorc <
shanliang2002ja...@gmail.com>:
> > <
android-group-japan%2Bunsu...@googlegroups.com<
android-group-japan%252Buns...@googlegroups.com>