一个可以自动换行适应行宽的标签列表控件
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.Simonzhuqi:SmartTabContainerLayout:1.0'
}
<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>
smartTabContainerLayout.addTab("tab_name");