1
我想爲我的ListView
項目背景製作漸變效果。 所以我創建了一個新的XML繪製包含以下內容:Android的矩形漸變centerX不工作
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:centerX="10%"
android:startColor="#FF0000"
android:endColor="#FFFFFF"
android:angle="0" />
但似乎centerX
屬性不工作,因爲centerX
點仍然在50%以上。如果我將centerX
更改爲任何其他值,則不會進行更改。 我也嘗試使用十進制數(0.1),但仍然沒有成功。
非常感謝:)