eowise / recyclerview-stickyheaders

DEPRECATED. Android library that integrate sticky section headers in your RecyclerView
http://eowise.github.io/recyclerview-stickyheaders
MIT License
961 stars 148 forks source link

Feature request: option to set headers to be not sticky #12

Closed vovan888 closed 9 years ago

passsy commented 9 years ago

push

passsy commented 9 years ago

eta for maven build for the 0.5 milestone?

leruaa commented 9 years ago

I'm updating documentation. I plan to release v0.5.0 in 1 or 2 days. In the meantime, you can use 0.4.4-SNAPSHOT published at sonatype snapshot repo :

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    compile 'com.eowise:recyclerview-stickyheaders:0.4.4-SNAPSHOT@aar'
}
oinegue commented 9 years ago

Setting .setSticky(false) doesn't work in my app, neither in the sample app. The header stay sticked on top and disappear when the first item of the group goes away from the top of the screen. Quite strange... I would like this feature as well. By the way, great job with this library!

leruaa commented 9 years ago

I've just tested non sticky headers with the samples, and it works... There is the code I have changed :

top = new StickyHeadersBuilder()
    .setAdapter(personAdapter)
    .setRecyclerView(list)
    .setStickyHeadersAdapter(new BigramHeaderAdapter(personDataProvider.getItems()))
    .setOnHeaderClickListener(this)
    .setSticky(false) \\ Added this line
    .build();

Can you provide a non working sample ?

oinegue commented 9 years ago

Yes, I tried exactly that code on the sample app, cloned yesterday from github. And something doesn't work. Here is a gif of the behaviour. I'm testing on a Galaxy Note 3 with Android 4.4.2 sticky_optim

leruaa commented 9 years ago

Ok, the commit I pushed few minutes ago fixes this issue too.

Can you try with the latest sources ?

oinegue commented 9 years ago

Yes, it fixes the issue! Thank you @acatinon!