Closed anishjohnrc closed 7 years ago
@anishjohnrc That is how it is expected to work because all the other views scroll normally while the header sticks on the top and when the other views pass behind the header, they appear to be overlapping. You could do the following to avoid that.
scrollView.setScrollViewListener(new IScrollViewListener() {
@Override
public void onScrollChanged(int l, int t, int oldl, int oldt) {
if(scrollView.isHeaderSticky()){
findViewById(R.id.headerLayout).setBackgroundResource(android.R.color.white);
}else{
findViewById(R.id.headerLayout).setBackgroundResource(android.R.color.transparent);
}
}
@Override
public void onScrollStopped(boolean isStoped) {
}
});
The items are overlapping if I define the header layout as transparent. Can you help me on that?