ListFragment multi-choice does not show selection

本秂侑毒 提交于 2019-12-06 08:28:09

I provide my custom list item view with a background selector.

<selector xmlns:android="http://schemas.android.com/apk/res/android"
    android:exitFadeDuration="@android:integer/config_mediumAnimTime">
<item android:state_activated="true" android:drawable="@drawable/number_bg_pressed" />
<item android:drawable="@android:color/transparent" />

I refer to APIdemos View/List/List16 example.

I use android.R.layout.simple_list_item_activated_1 for layout when I set up SimpleCursorAdapter. Custom theme may be a better solution. In my case I have a static method to retrieve the layout depending on android api version.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!