LinearLayout バックグラウンドとして次のドローアブル セットを取得しました。
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:tileMode="repeat"
android:dither="true"
android:src="@drawable/bg"/>
</item>
<item>
<shape android:shape="rectangle">
<gradient
android:startColor="#ffff0000"
android:endColor="#ff00ff00"
android:centerX="50%"
android:centerY="50%"
android:gradientRadius="50%"
android:type="radial"/>
</shape>
</item>
</layer-list>
docsによると、gradientRadius はウィンドウ/親サイズのパーセンテージに設定できます。残念ながら...うまくいきません。半径は 0 です。何が間違っていますか? または、Android の何が問題になっていますか?
画面全体を埋めるために放射状グラデーションが必要です。回避策は何ですか?