问题
I'm using android support library (23.1.1) to create a tab layout. I followed the tutorial here, it uses AppCompatActivity. The problem is that the indicator of the TabLayout is handing between the two tabs and not moving smoothly when swiping. When searching for a solution I found similar problem that the indicator bounces between tabs, and its solution was to use newer version of the library. I'm using the latest version and facing this problem.
回答1:
Get the SlidingTabStrip file here - https://github.com/google/iosched/blob/0a90bf8e6b90e9226f8c15b34eb7b1e4bf6d632e/android/src/main/java/com/google/samples/apps/iosched/ui/widget/SlidingTabStrip.java
you can also follow this tutorial on Android4Devs - http://www.android4devs.com/2015/01/how-to-make-material-design-sliding-tabs.html to get started
来源:https://stackoverflow.com/questions/34006230/android-tablayout-indocator-hanging-between-tabs