Showing the current selection in a listview

后端 未结 4 854
旧巷少年郎
旧巷少年郎 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

    If you use a custom layout for each row:

    1. create a selector with android:state_activated="true"
    2. apply it as the background of the custom layout.

    an example of the selector drawable:

    
    
    
    
    
    

提交回复
热议问题