新建了一个handler就可以调用SmoothScrollTo了,难道是因为miui的问题?
private Handler handler = new Handler(){
public void dispatchMessage(android.os.Message msg) {
if (msg.what==HIDEEN_MENU) {
SlideBarView.this.smoothScrollTo(0,0);
}
else if (msg.what==SHOW_MENU) {
SlideBarView.this.smoothScrollTo(menuWidth,0);
}
}
};