How to do smooth scrolling with viewpager on Google Glass? (in particular viewpagerindicator lib). I have implemented viewpagers and they work, however swiping on the touchpad quickly scrolls through the views. I would like to have smooth scrolling similar to the mirror api menus. Anyone have ideas? I have attempted to intercept touchevents using the code below, but the overriden methods are not called. Seems Glass takes the touch events and turns them into d-pad events. OnPageScrolled(which is useless for what I'm doing) is called, but the other methods are not.
class MyViewPager extends ViewPager{
public MyViewPager(){
}
@Override
public void onPageScrolled(int arg0, float arg1, int arg2) {
// TODO Auto-generated method stub
super.onPageScrolled(arg0, arg1, arg2);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent arg0) {
// TODO Auto-generated method stub
return super.onInterceptTouchEvent(arg0);
}
@Override
public boolean onTouchEvent(MotionEvent arg0) {
// TODO Auto-generated method stub
return super.onTouchEvent(arg0);
}
}