gitgrimbo/android-sliding-menu-demo

Delay on scroll to right

Opened this issue · 0 comments

When adding the views on the MyHorizontalScrollView, if the app view is heavy you can see the delay before this happens:
new Handler().post(new Runnable() {
@OverRide
public void run() {
me.scrollBy(scrollToViewPos, 0);
}
});

I fixed it by adding this to the MyHorizontalScrollView class:
@OverRide
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
this.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
}