gpt4 book ai didi

android - SmartTabLayout 厚度

转载 作者:行者123 更新时间:2023-11-29 20:11:47 30 4
gpt4 key购买 nike

我正在使用 SmartTabLayout。我想使用这样的指标(如圆圈)。我在 xml 中找不到合适的参数。有什么想法吗?

想要这个:

enter image description here

我有这个:

enter image description here

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" />

最佳答案

浏览演示中的一些代码。我遇到了“技巧 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"
/>

关于android - SmartTabLayout 厚度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34694028/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com