Quantcast
Channel: 楽天 みんなで解決!Q&A 新着質問([技術者向] コンピューター/205)
Viewing all articles
Browse latest Browse all 29232

Androidアプリ開発に関する質問です。

$
0
0
Androidアプリ開発に関する質問です。 Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.xxx); という記述でres/drawable-hdpi/xxx.png の画像を持ってくることができると思うのですが、 データベースに保存したString型のxxxを使って動的に画像を表示する方法が分かりません。 データベースから画像名を持ってくる前に、String型の変数(仮にstrとする)に画像名を入れて、 Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.str); と記述してもstrを変数として扱ってくれません。 どなたかres/drawable/の画像を動的に持ってくる方法を教えて頂けないでしょうか。

Viewing all articles
Browse latest Browse all 29232

Trending Articles