viewpage.addOnPageChangeListener (new ViewPager.OnPageChangeListener () {
@Override
public void onPageScrolled (final int position, final float positionOffset, final int positionOffsetPixels) {
floatView.setX (positionOffset*floatView.getWidth () + tabLive.getX () + position * tabLive.getWidth ());
}
@Override
public void onPageSelected (final int position) {
}
@Override
public void onPageScrollStateChanged (final int state) {
}
});