luizgrp / SectionedRecyclerViewAdapter

An Adapter that allows a RecyclerView to be split into Sections with headers and/or footers. Each Section can have its state controlled individually.
MIT License
1.68k stars 372 forks source link

Disable touch on "section" #4

Closed jgutierrez11 closed 8 years ago

jgutierrez11 commented 8 years ago

Hello, I was testing this lib and I found out that "section" is clicked like any normal item. How can I prevent "section" from triggering the click event. And how can I add a custom long press event in the section?

Thanks in advanced, great work!

luizgrp commented 8 years ago

Hi @jgutierrez11,

You mean the "header" of the section is clicked like any normal item? If so, you can check the first example, the header is not clickable. You can find the layout for the header here.

In order to add a long press in a view you can use OnLongClickListener, for example, you can use setOnLongClickListener instead of setOnClickListener here.

Cheers

jgutierrez11 commented 8 years ago

Excellent, I just implemented it. And works great. Another question: How can I make the headers to be Sticky? Thanks!

luizgrp commented 8 years ago

sticky headers is not currently implemented in the library, but it is on my road map :)

jgutierrez11 commented 8 years ago

Great! Waiting for that feature 👍