Created
December 17, 2012 22:51
-
-
Save derekbrameyer/4323160 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { | |
super.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount); | |
if (view.getChildAt(0) != null) { | |
View header = view.getChildAt(0).findViewById(R.id.header); | |
if (header != null && header.getVisibility() == View.VISIBLE) { | |
header.setVisibility(View.INVISIBLE); | |
} | |
} | |
if (view.getChildAt(1) != null) { | |
View header = view.getChildAt(1).findViewById(R.id.header); | |
if (header != null && header.getVisibility() == View.INVISIBLE) { | |
header.setVisibility(View.VISIBLE); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment