0

是否有选项可以使指标浮动在选定的选项卡下?我在这里描述了这个问题:https ://github.com/jpardogo/PagerSlidingTabStrip/issues/67因为我使用的是分叉库,因为它允许我设置自定义视图

4

1 回答 1

1

这很简单,只需将 PagerSlidingTabSTrip 包装在 ViewGroup 中,并添加一些填充,例如。

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="10dp"
    android:paddingRight="10dp"
    android:paddingLeft="10dp"
    android:background="@color/pst_bg_color">

    <com.astuetz.PagerSlidingTabStrip
        android:id="@+id/psts"
        style="@style/BaseTextViewStyle"
        android:layout_width="match_parent"
        android:layout_height="38dp"
        android:background="@color/pst_bg_color"
        android:textColor="@color/white"
        android:textSize="18sp"
        app:pstsTextAllCaps="false"
        app:pstsIndicatorHeight="@dimen/pst_indicator_height"
        app:pstsShouldExpand="@bool/main_pst_should_expand"
        app:pstsIndicatorColor="@color/pst_indicator_color"
        app:pstsDividerColor="@color/pst_divider_color"
        app:pstsUnderlineHeight="0dp"/>

</LinearLayout>
于 2015-03-06T10:03:24.390 回答