开发者

ListView Click and LongClick

I have a ListView with an ItemClickListener and an ItemLongClickListener. When you click an item, it starts a new activity. When you long click an item, it sets the visibility of a hidden textview in that row to visible.

When you long click, the hidden textview becomes visible, but when you release the click it starts the new activity, which I don't want.

How do I go about having both listeners? Also, I'm considering on a long click to make the hidden textview visible in all rows (using LongClic开发者_如何学GokListener instead of ItemLongClickListener), not just the clicked one but I'm unable to get it to even recognize a longclick then.


Return true to signalize that the event has been handled.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜