Как установить макет вкладки, отображающий только одну метку по центру вкладки - PullRequest
0 голосов
/ 19 октября 2018

Вот так выглядит мое приложение: enter image description here

А вот мой xml:

<android.support.design.widget.TabLayout
    android:id="@+id/tab_layout"
    android:layout_width="match_parent"
    android:layout_height="?actionBarSize"
    android:background="@color/colorPrimary"
    app:tabIndicator="@color/colorAccent"
    app:tabGravity="center"
    app:tabMinWidth="0dp"
    app:tabMode="scrollable"
    >
</android.support.design.widget.TabLayout>

<android.support.v4.view.ViewPager
    android:id="@+id/view_pager"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1" />

Япопробуйте изменить вкладку Gravity и tab max / minWidth, но ничего не изменится

...