Skip to content

一个可以自动换行适应行宽的标签列表控件

Notifications You must be signed in to change notification settings

Simonzhuqi/SmartTabContainerLayout

Repository files navigation

SmartTabContainerLayout

一个可以自动换行适应行宽的标签列表控件

image

How to use:

Step 1. Add the JitPack repository to your build file

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}

Step 2. Add the dependency

dependencies {
	        implementation 'com.github.Simonzhuqi:SmartTabContainerLayout:1.0'
	}

Step 3. Edit your xml and add this layout

    <com.doophe.smarttabcontainerlib.SmartTabContainerLayout
        android:id="@+id/tab_container_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/darker_gray"
        android:padding="30dp"
        app:tab_background="@drawable/default_bg_tab"
        app:tab_text_size="8sp"
        app:tab_text_color="@android:color/black"
        app:tab_vertical_span="6dp"
        app:tab_horizontal_span="12dp"
        app:tab_padding_left="20dp"
        app:tab_padding_top="6dp"
        app:tab_padding_right="20dp"
        app:tab_padding_bottom="6dp"
        ></com.doophe.smarttabcontainerlib.SmartTabContainerLayout>

Step 4. Add tab in your JAVA

smartTabContainerLayout.addTab("tab_name");

About

一个可以自动换行适应行宽的标签列表控件

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages