Android:TabLayout指示符挂在选项卡之间 [英] Android: TabLayout indocator hanging between tabs
问题描述
我正在使用android支持库(23.1.1)创建标签布局.我遵循了此处教程,它使用了AppCompatActivity.问题在于,TabLayout的指示器正在两个选项卡之间移动,并且在滑动时无法平稳移动.在寻找解决方案时,我发现指示器在选项卡之间反弹的类似问题,其解决方案是使用该库的较新版本.我正在使用最新版本并面临此问题.
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.
推荐答案
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
这篇关于Android:TabLayout指示符挂在选项卡之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!