4 回答

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊
android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:drawSelectorOnTop="false"
android:divider="#C8C8C8"
android:background="#C8C8C8"
android:cacheColorHint="#00000000"/>

TA貢獻(xiàn)1784條經(jīng)驗(yàn) 獲得超2個(gè)贊
在ListView標(biāo)簽上添加屬性
android:cacheColorHint="#00000000" // setting transparent color

TA貢獻(xiàn)1963條經(jīng)驗(yàn) 獲得超6個(gè)贊
非常簡單,只需在布局文件中使用以下行:
android:scrollingCache="false"
像這樣:
<ListView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollingCache="false"
/>

TA貢獻(xiàn)1735條經(jīng)驗(yàn) 獲得超5個(gè)贊
您可以這樣使用:
list.setCacheColorHint(Color.TRANSPARENT);
list.requestFocus(0);
- 4 回答
- 0 關(guān)注
- 482 瀏覽