56
我有以下梯度:如何製作透明漸變?
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#ECECEC"
android:centerColor="#F6F6F4"
android:endColor="#F8F8F6"
android:angle="90"
android:dither="true"
/>
</shape>
我想這是透明的,因爲在我的ListView我設置這個作爲我ListSelector:
<ListView android:layout_width="fill_parent"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ARListView"
android:background="@drawable/transparent_background"
android:cacheColorHint="#00000000" android:drawSelectorOnTop="true"
android:listSelector="@drawable/stocks_selected_gradient">
</ListView>
黑灰色的怎麼樣? – Mikey 2011-06-23 08:46:33
謝謝,這個答案對我很有幫助 – mahdi 2013-07-16 21:39:51
最好使用@android:顏色/透明代替#00xxxxxx – 2015-03-07 16:35:35