TabLayout 点击的时候其底部的Indicator会有一个回弹抖动,解决方案
if (ViewCompat.isLaidOut(mTabLayout)) {
mTabLayout.setupWithViewPager(mViewPager);
} else {
mTabLayout.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
mTabLayout.setupWithViewPager(mViewPager);
mTabLayout.removeOnLayoutChangeListener(this);
}
});
}
https://code.google.com/p/android/issues/detail?id=175073
https://code.google.com/p/android/issues/detail?id=180462