Showing the current selection in a listview

后端 未结 4 848
旧巷少年郎
旧巷少年郎 2020-12-01 04:26

As seen in the tablet version of gmail and google talk I am trying to show the current selection in a listview. I know this is not standard practice and should be avoided wh

4条回答
  •  既然无缘
    2020-12-01 05:14

    What worked for me

    1. override the global ListView Style in your theme

      @style/MyListView

    2. define your style

    3. define the selector listview_background_selector.xml

    4. set the background of your listview-item-layout

      android:background="?android:attr/activatedBackgroundIndicator"

提交回复
热议问题