2012年4月26日 星期四

[Android] Custom ListView

介紹如何使用 ListView
ListView之一:Adapter介紹與使用

如何產生 separated header
Separating Lists with Headers in Android 0.9

當我們使用 custom background 時, 如果 scroll ListView
會發現出現黑色的背景, 這個問題的原因如下:

ListView 使用 transparent background, 但是在 scroll 時
會用 cache color hint 來當作背景以加速繪圖
詳細的說明在此 http://developer.android.com/resources/articles/listview-backgrounds.html

因此, 我們可以用 ListView::setColorHint() 或是 xml 來改變 scroll 時
會出現的背景色, 或設為 #00000000


沒有留言:

張貼留言

FPGA/STM32 SPI 實驗

本實驗中,Nucleo H753ZI 當作 SPI Master,PYNQ-Z2 當作 SPI Slave。 使用SPI通訊協定傳送及接收8 Bytes。 腳位設定如下: Nucleo H753ZI 功能 PYNZ-Z2 PD14 CS W9 PA5 SCLK...