【问题标题】:SmartTabLayout thicknessSmartTabLayout 厚度
【发布时间】:2016-01-09 13:27:50
【问题描述】:

我正在使用SmartTabLayout。我想使用这样的指标(像一个圆圈)。我在xml 中找不到合适的论据。 有什么想法吗?

想要这个:

我有这个:

XML 代码:

 <com.ogaclejapan.smarttablayout.SmartTabLayout
        android:id="@+id/tabs"
        android:layout_width="match_parent"
        android:layout_height="48dp"
        app:stl_clickable="true"
        app:stl_defaultTabBackground="?attr/selectableItemBackground"
        app:stl_defaultTabTextAllCaps="true"
        app:stl_defaultTabTextColor="#FC000000"
        app:stl_defaultTabTextHorizontalPadding="16dp"
        app:stl_defaultTabTextMinWidth="0dp"
        app:stl_defaultTabTextSize="12sp"
        app:stl_distributeEvenly="false"
        app:stl_dividerColor="#4D000000"
        app:stl_dividerThickness="1dp"
        app:stl_drawDecorationAfterTab="false"
        app:stl_indicatorAlwaysInCenter="false"
        app:stl_indicatorColor="#40C4FF"
        app:stl_indicatorCornerRadius="2dp"
        app:stl_indicatorGravity="bottom"
        app:stl_indicatorInFront="false"
        app:stl_indicatorInterpolation="smart"
        app:stl_indicatorThickness="4dp"
        app:stl_indicatorWidth="auto"
        app:stl_indicatorWithoutPadding="false"
        app:stl_overlineColor="#4D000000"
        app:stl_overlineThickness="0dp"
        app:stl_titleOffset="24dp"
        app:stl_underlineColor="#4D000000"
        app:stl_underlineThickness="1dp" />

【问题讨论】:

    标签: android android-activity tabbed-view


    【解决方案1】:

    浏览演示中的一些代码。我遇到了“Trick 1”布局,这可能就是答案。测试一下,如果它不起作用,请回复我。如果它不起作用,我将拉出项目并对其进行测试。

    <com.ogaclejapan.smarttablayout.SmartTabLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@id/viewpagertab"
        android:layout_width="match_parent"
        android:layout_height="@dimen/tab_height"
        android:clipToPadding="false"
        android:paddingLeft="4dp"
        android:paddingRight="4dp"
        app:stl_defaultTabTextColor="@color/white"
        app:stl_defaultTabTextHorizontalPadding="18dp"
        app:stl_dividerColor="@color/transparent"
        app:stl_dividerThickness="0dp"
        app:stl_indicatorColor="@color/black_20"
        app:stl_indicatorCornerRadius="18dp"
        app:stl_indicatorInterpolation="smart"
        app:stl_indicatorGravity="center"
        app:stl_indicatorThickness="36dp"
        app:stl_underlineColor="@color/transparent"
        app:stl_underlineThickness="0dp"
        />
    

    【讨论】:

      猜你喜欢
      • 2012-06-17
      • 2013-01-10
      • 1970-01-01
      • 2021-10-19
      • 2021-12-09
      • 2011-11-06
      • 2011-04-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多