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.
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.
1
If you can already make the selection then:
onItemLongClick()
return false
.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 android
You are not signed in. Login or sign up in order to post.
What you’ve already done?
– Marco Souza
I have the list and the method of onItemLongClick implemented, in this method it selects the item
– Eduardo Bonfa
post what you have, and where is the problem.
– Marco Souza
It’s a lot of code, I’d just like one example
– Eduardo Bonfa
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
– user28595