Closed denisokvrn closed 7 years ago
I solved this problem by this article https://github.com/2013mzhou/blog/blob/master/bug%26extend/Get%20StickyHeaderView%20in%20SuperSLiM.md .It's run well.
when useing like this
final LayoutManager layout = new LayoutManager(getActivity());
layout.setOnHeaderListener(new LayoutManager.StickyHeaderWatcher() {
@Override
public void onStickyStateChanged(View header, int position) {
Log.i("StickyHeaderWatcher",position+"");
if (header instanceof TextView) {
Log.i("StickyHeaderWatcher", ((TextView) header).getText().toString());
}
}
});
need to show shadow when header is sticky. now i use https://github.com/emilsjolander/StickyListHeaders and setOnStickyHeaderOffsetChangedListener/setOnStickyHeaderChangedListener for this. but I want replace listview on recyclerview. i find this https://github.com/TonicArtos/SuperSLiM/wiki/Sticky-elevation-proposal (but sorry for my english, i can did understand) but dont find this listeners in library