StickyHeaders icon indicating copy to clipboard operation
StickyHeaders copied to clipboard

NestedScrollView problem

Open mancj opened this issue 8 years ago • 9 comments

Hi. Thanks for this amazing library!

I have a view with the following structure

<NestedScrollView>
    <LinearLayout>
        <ImageView/>
        <RecyclerView/>
    </LinearLayout>
</NestedScrollView>

When I scroll NestedScrollView, the list is also scrolled, but the ImageView is not moving. How to fix it?

mancj avatar May 25 '17 15:05 mancj

Hey, Did you find the solution?

The-RobinHood avatar Nov 07 '17 09:11 The-RobinHood

Hi!

Formerly in a structure where a ScrollView encompasses a listview, the total size of the list view judging all items was calculated and set in the listview so that only the scroll of scrollview would work, but today has the nestedscrollview option.

Maybe this post can help you. Take a look at: https://stackoverflow.com/questions/31000081/how-to-use-recyclerview-inside-nestedscrollview

tulioccalazans avatar Nov 07 '17 10:11 tulioccalazans

Link is dead. And I'm using nestedscrollview though its not working, its scrollup entire content instead header stick.

The-RobinHood avatar Nov 07 '17 10:11 The-RobinHood

Please look at xml, I am doing same but no luck. https://paste.ofcode.org/VL9QP3526cAscc7jStyski

The-RobinHood avatar Nov 07 '17 10:11 The-RobinHood

Did you try it in code-behind?

RecyclerView v = (RecyclerView) findViewById(...); v.setNestedScrollingEnabled(false)

tulioccalazans avatar Nov 07 '17 10:11 tulioccalazans

with above layout, Recycleview is not visible when I used StickyHeaderLayoutManager and with default Layoutmanager its works fine.

So don't know where is the issues, let me know if you have clue.

Note: v.setNestedScrollingEnabled(false) I already set this.

The-RobinHood avatar Nov 07 '17 10:11 The-RobinHood

StickyHeaderLayoutManager Provides equivalent behavior to a simple LinearLayoutManager, but where section header items are positioned in a "sticky" manner like the section headers in iOS's UITableView. StickyHeaderLayoutManager MUST be used in conjunction with SectioningAdapter.

Well, it seems that it's not the behaviour we want. BUT if StickyHeaderLayoutManager MUST be used in conjunction with SectioningAdapter, maybe you can customize the SetioningAdapter like that: https://github.com/lopspower/HFRecyclerView

See THIS and code something like that!

tulioccalazans avatar Nov 07 '17 10:11 tulioccalazans

Its not helpful.

The-RobinHood avatar Nov 07 '17 13:11 The-RobinHood