No item click effect like RecyclerView
Closed this issue · 2 comments
Describe the bug
My TreeView row using CardView, I set it to “selectableItemBackground” but no click effect work. It works fine with default RecyclerView (using same layout.xml).
To Reproduce
Steps to reproduce the behavior:
- Create TreeView with custom tree node view
- Add android:focusable="true", android:clickable="true" and android:foreground="?attr/selectableItemBackground" to custom tree node view
- Click on 1 tree node
- No click effect performed
Expected behavior
TreeView item should has ripple effect when clicked.
https://drive.google.com/file/d/116yVaXkOfKYCWkDr6ZSc7rb4KdzsEnVd/view?usp=sharing
Video
https://drive.google.com/file/d/118hr4uv6pyGhtSHLSnOu_EO6UP6h6vD8/view?usp=sharing
Smartphone (please complete the following information):
- Device: Realme 5i
- OS: Android 13
- Version 1.1.3
Hello @ptu1710,
Thank you for reporting and creating sample for this issue, i have solved it and it increase the performance on the adapter, I will publish bug fix release now and you can try it after 1h.
TreeView.Improvements.mp4
Thank you and Enjoy TreeView
Amr Hesham
Thanks for this quick fix! I will try it then.