Skip to content

指示器无法与文字对齐 #34

Description

@Heart-Beats

大佬您好,我的 tab布局如下:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:paddingEnd="@dimen/dp_30"
    android:paddingBottom="@dimen/sp_6">


    <com.zhengsr.tablib.view.TabColorTextView
        android:id="@+id/item_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:textSize="@dimen/sp_9"
        app:colortext_change_color="@color/color_595cca"
        app:colortext_default_color="@color/color_6f718f"
        tools:text="测试" />


</FrameLayout>

整个tab 设置属性如下:

            <com.zhengsr.tablib.view.flow.TabVpFlowLayout
                android:id="@+id/rectflow"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:tab_action_orientaion="left"
                app:tab_width_equals_text="true"
                app:tab_color="@color/colorPrimary"
                app:tab_type="rect" />

最终显示的效果却如下:
image

无论我怎么设置 tab布局 中的 paddingEnd 或者 marginEnd,始终都达不到想要的效果,现在除了想到写死宽度,在设置指示器的宽度,没想到好的方法

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions