How to continue selecting after onItemLongClick?

Asked

Viewed 52 times

2

I have a listView,who has a method onItemLongClick that when clicking selects the clicked item. I would like to know how to continue selecting with just one click.

If anyone can post an example I’d appreciate it.

  • What you’ve already done?

  • I have the list and the method of onItemLongClick implemented, in this method it selects the item

  • post what you have, and where is the problem.

  • It’s a lot of code, I’d just like one example

  • It is important you post what you have done that is generating the difficulty, I suggest you take a look at How to create a Minimum, Complete and Verifiable example

1 answer

1


If you can already make the selection then:

  • Do the method onItemLongClick() return false.
  • Implement the method onItemClick() passing the code that is on onItemLongClick() and who makes the selection for him.

If you don’t see this reply.

  • A tip too, if I already have something implemented in onItemClick(), just use an if with Boolean that also solves.

  • Yes, that’s what I say in one of the comments of the reply I indicated

  • Very good, thank you, :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.