複数の画像を含む xml を作成するには? このファイルは描画可能なフォルダーに保存する必要があると思いますか? つまり、そのxmlの構造はどうあるべきですか? より詳細に説明すると、たとえば、ビットマップ XML があります。
<?xml version="1.0" encoding="UTF-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/logo_top"
android:dither="true" />
そして、いくつかの画像を追加する必要があるまではうまく機能します.1つのXMLファイルにビットマップを追加する方法がないことを理解しているので、その方法を検索します. PS画像を動的かつプログラム的に追加するには、この手法が必要です。
また、私はこの方法でそれをやろうとしました:
<?xml version="1.0" encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/logo_top"
android:dither="true" />
</item>
<item>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/image2"
android:dither="true" />
</item>
<item>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/image3"
android:dither="true" />
</item>
</layer-list>
しかし、画像は表示されませんでした。