在recyclerview中触发onitemactivatedListener。
onitemactivatedListener.OniteMactivated
说此方法是
当项目“激活”时调用。例如,当不存在选择并用手指点击项目时,将项目激活,或用指向设备(如鼠标)单击项目。
但是,当不存在选择并用她(/his)手指敲击物品时,该物品不会被激活。众所周知,当没有选择时,您必须长时间按一个以激活它的项目,并且只能通过Tap激活后续项目。 (通过激活,在这里,我的意思是项目选择。对不起,对不起 因此,我想弄清楚他们的术语。)
因此,我想澄清当该项目刚刚被长时间敲击或激活时是否调用此方法。
The documentation for OnItemActivatedListener.onItemActivated
says that this method is
Called when an item is "activated". An item is activated, for example, when no selection exists and the user taps an item with her finger, or double clicks an item with a pointing device like a Mouse.
But, when no selection exists and user taps an item with her(/his) finger, the item does not get activated. As I know, when there is no selection, you have to long press an item for activating it, and only the subsequent items can be activated just by tap. (By activation, here, I mean item-selection. Sorry that Android messed up with their terminology.)
So, I wanted to clarify if this method is called when the item is just-tapped or activated by long-press.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
长压行不通,但是在挖掘物品时会触发它。
除非明确添加,否则它甚至不会将项目添加到选择中。
Long-press doesn't work, but it gets triggered when an item is being tapped.
And it doesn't even add the item to the selection, unless explicitly adding it.