ListView item background via custom selector

前端 未结 10 1533
深忆病人
深忆病人 2020-11-22 08:19

Is it possible to apply a custom background to each Listview item via the list selector?

The default selector specifies @android:color/transparent for t

10条回答
  •  时光取名叫无心
    2020-11-22 08:54

    The article "Why is my list black? An Android optimization" in the Android Developers Blog has a thorough explanation of why the list background turns black when scrolling. Simple answer: set cacheColorHint on your list to transparent (#00000000).

提交回复
热议问题