Last active
March 24, 2018 20:16
-
-
Save saiday/2ae656aef8a2779f593867464ffa0a87 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 setPrimaryItem(@NonNull ViewGroup container, int position, @NonNull Object object) { | |
super.setPrimaryItem(container, position, object); | |
NestedScrollView current = ((NestedScrollView)object); | |
current.setNestedScrollingEnabled(true); | |
for (int i = 0; i < getCount(); i++) { | |
if (i != position) { | |
NestedScrollView otherScrollView = container.findViewWithTag(i); | |
otherScrollView.setNestedScrollingEnabled(false); | |
} | |
} | |
container.requestLayout(); | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment