ksoichiro / Android-ObservableScrollView

Android library to observe scroll events on scrollable views.
http://ksoichiro.github.io/Android-ObservableScrollView/
Apache License 2.0
9.66k stars 2.06k forks source link

Parallax + gridview #148

Open acejerald opened 9 years ago

acejerald commented 9 years ago

cannot set header in grid view. Google's implementation of HeaderGridView addresses this problem. They are subclassing GridView. with https://android.googlesource.com/platform/packages/apps/Gallery2/+/idea133/src/com/android/photos/views/HeaderGridView.java

is it possible to subclass ObservableGridView with HeaderGridView? sop that we can set up parallax with gridview?

ksoichiro commented 9 years ago

I haven't checked details of HeaderGridView, but maybe you can achieve that if you put modifications of HeaderGridView into ObservableGridView. It's a good idea, so I'll also try that.

ksoichiro commented 9 years ago

I added addHeaderView() method to ObservableGridView. You can try it on FlexibleSpaceWithImageWithViewPagerTabActivity example.

It's available with 1.6.0-SNAPSHOT.

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

dependencies {
    compile "com.github.ksoichiro:android-observablescrollview:1.6.0-SNAPSHOT"
}
acejerald commented 9 years ago

thanks a lot will check this out :+1: