SmartTabLayout点击涟漪效应

时间:2017-03-01 03:32:59

标签: android tabs material-design android-tablayout ripple

我正在使用SmartTabLayout,我想在点击或选择标签时禁用涟漪效果和一些灰色方形背景。

我将此代码添加到我的xml中但仍然无效:

<com.ogaclejapan.smarttablayout.SmartTabLayout
    android:id="@+id/viewpagertab"
    android:layout_width="match_parent"
    android:layout_height="@dimen/tab_height"
    app:tabBackground="@android:color/transparent"
    android:background="@android:color/transparent"
    app:stl_indicatorAlwaysInCenter="false"
    app:stl_indicatorWithoutPadding="false"
    app:stl_indicatorInFront="false"
    app:stl_indicatorInterpolation="smart"
    app:stl_indicatorGravity="bottom"
    app:stl_indicatorColor="#40C4FF"
    app:stl_indicatorThickness="2dp"
    app:stl_indicatorWidth="auto"
    app:stl_underlineColor="@android:color/transparent"
    app:stl_underlineThickness="1dp"
    app:stl_dividerColor="@android:color/transparent"
    app:stl_dividerThickness="1dp"
    app:stl_indicatorCornerRadius="2dp"
    app:stl_defaultTabTextAllCaps="true"
    app:stl_defaultTabTextColor="#FC000000"
    app:stl_defaultTabTextSize="14sp"
    app:stl_defaultTabTextHorizontalPadding="16dp"
    app:stl_defaultTabTextMinWidth="0dp"
    app:stl_distributeEvenly="false"
    app:stl_clickable="true"
    app:stl_titleOffset="24dp"
    app:stl_drawDecorationAfterTab="false" />

我尝试了this solution,但也没有工作。

任何想法? 这是我的xml:

reduce

1 个答案:

答案 0 :(得分:0)

您是否尝试过 android:clickable =&#34; true&#34;

相关问题