android - Handle only one either Recycler view's item click or inside view click -


by following handle button click inside row in recyclerview , issue cardview , onclicklistener in recyclerview code working both view i.e complete row , imageview inside row.

if imageview inside row clicked onclick of row item should not fired, happen following approach in given links

like listview item if give focusable="true" of view inside row onitemclick not fired, if view inside row clicked (only onclick(view) fired.

how make possible recycler view?

you may have better success using listeners can "bubble up" events activity/fragment. should able keep things separate.

here example: https://guides.codepath.com/android/using-the-recyclerview#attaching-click-handlers-using-listeners

i followed tutorial create 1 click on row, , created (on own) handle clicking on button within row.


Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -