android - recyclerView对item设置点击事件后出现的问题
PHP中文网
PHP中文网 2017-04-17 17:28:22
0
1
518

在adapter里对recyclerView的item设置点击事件后,再对recyclerView本身设置touch事件时,捕捉不到Down这个action。

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(1)
Ty80

item’s click event overwrites recyclerView’s click event.
If you want to exist at the same time, you need to add android:descendantFocusability="blocksDescendants" to the
item and layout
Add android:focusable="false" to the click control

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template