Merge "[SetupWizardLib] Post checkScroll in BottomScrollView" into ub-setupwizard-alatar

This commit is contained in:
Maurice Lam 2015-03-10 22:04:51 +00:00 committed by Android (Google) Code Review
commit 3bf68bb096

View file

@ -37,6 +37,13 @@ public class BottomScrollView extends ScrollView {
private int mScrollThreshold;
private boolean mRequiringScroll = false;
private final Runnable mCheckScrollRunnable = new Runnable() {
@Override
public void run() {
checkScroll();
}
};
public BottomScrollView(Context context) {
super(context);
}
@ -62,7 +69,10 @@ public class BottomScrollView extends ScrollView {
- getPaddingBottom());
}
if (b - t > 0) {
checkScroll();
// Post check scroll in the next run loop, so that the callback methods will be invoked
// after the layout pass. This way a new layout pass will be scheduled if view
// properties are changed in the callbacks.
post(mCheckScrollRunnable);
}
}