我正在使用自定義水平列表視圖,我的需要是更改點擊項目的顏色。如何在自定義水平列表視圖中更改所選項目android
這裏是我的XML
<com.meetme.android.horizontallistview.HorizontalListView
android:id="@+id/hlvCustomList"
android:layout_width="match_parent"
android:layout_height="50dp"
/>
selectedRow = view; //view is the onitemSelectListner View
if (selectedRow != null) {
selectedRow.setBackgroundColor(Color.BLUE);
}
view.setBackgroundColor(Color.BLUE);
的代碼,我已經試過這個代碼在項目單擊,但不是爲我工作。
請給我建議適當的方法來做到這一點。
這個問題似乎是題外話題,因爲它沒有包含任何研究工作。 – aga 2014-10-05 08:18:49