-2

Androidの別のimageview内に画像を配置しようとしています。ユーザーが数字「1」を選択すると、その数字の画像が別の imageView に表示されます。画像を別の画像に組み込むことは可能ですか。あなたの貴重な提案を述べてください。

前もって感謝します!!

4

1 に答える 1

1

1 つの画像ビューに 2 つの画像を表示する私の解決策は、LayerDrawable

Resources r = getResources();
Drawable[] layers = new Drawable[2];
layers[0] = r.getDrawable(R.drawable.t);
layers[1] = r.getDrawable(R.drawable.tt);
LayerDrawable layerDrawable = new LayerDrawable(layers);
testimage.setImageDrawable(layerDrawable);

参照: http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList

于 2013-10-29T05:44:24.860 に答える