Improve condition to update the sticky content
AcidFlow opened this issue · comments
If the update is not required, reset the translation if any:
if ( !isHeaderUpdateRequired( ) ) {
if(mStickyViewParent.getTranslationY() != 0){
resetStickyHeaderTranslation();
}
return;
}
isHeaderUpdateRequired() should be true if we need to update the Sticky content :
private boolean isHeaderUpdateRequired( ) {
return isHeader( mFirstVisiblePos ) || isCurrentHeaderPushed
|| mHeaderPosition == RecyclerView.NO_POSITION
|| shouldUpdateStickyHeaderContent();
}
Closed in 0.1.2