具有动画的自定义tabLayout指示器

时间:2019-01-22 10:42:20

标签: android android-layout android-tablayout

我想在Android中使用自定义可绘制的方式更改tabIndicator的背景。 我已将tabBackground更改为自定义可绘制选择器

<android.support.design.widget.TabLayout
    android:id="@+id/tabs"
    android:layout_width="match_parent"
    android:layout_height="48dp"
    android:layout_below="@+id/text_view_label_movie"
    app:tabIndicatorColor="#f00"
    app:tabIndicatorHeight="10dp"
    app:tabBackground="@drawable/tab_bg"
    app:tabTextColor="@android:color/white" />

但是问题是我看不到tabIndicator之类的动画

enter image description here

我想要tabBackground,即蓝色可绘制对象像红色tabIndicator一样移动。那么,有什么方法可以使我自定义tabIndicator或为标签背景设置动画?

0 个答案:

没有答案
相关问题