开发者

Highlight selected cell with background image

I am trying to highli开发者_开发知识库ght touched cells of my listView. Because the cells have a backgroundimage set I use an onTouchListener for the View of the tableCell to change the ColorFilter.

As described here the onTouch Listener seems to conflict with a OnItemClickListener of a ListView.

So is there any easier way to highlight a cell with a backgroundimage?


You can setup a list selector property and a drawable file for the state_selected/pressed etc.


I figured out that StateListDrawables can also be created programatically, so I could use a generic approach for setting background pictures.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜