Skip to content

Dawish/FlymeTabStrip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
742637254@qq.com
Apr 21, 2018
ed64581 · Apr 21, 2018

History

16 Commits
Apr 21, 2018
Jan 22, 2017
Apr 21, 2018
Jan 22, 2017
Jan 16, 2017
Jan 15, 2017
Jan 22, 2017
Apr 21, 2018
Jan 15, 2017
Jan 15, 2017
Jan 15, 2017
Jan 15, 2017

Repository files navigation

FlymeTabStrip

Flyme6 ViewPager TabStrip 自定义实现Flyme6的ViewPager指示器,实现效果如下:

效果图

Gradle

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

dependencies {
    compile 'com.github.Dawish:FlymeTabStrip:v1.0.2'
}

Attrs

    <declare-styleable name="FlymeTabStrip">
        <!-- 指示器高度 -->
        <attr name="indicatorHeight" format="dimension" />
        <!-- 指示器滑动条颜色 -->
        <attr name="indicatorColor" format="color" />
        <!-- 指示器左右间距 -->
        <attr name="indicatorMargin" format="dimension" />
        <!-- 指示器文字颜色 -->
        <attr name="indicatorTextColor" format="color" />
        <!-- 指示器文字大小 -->
        <attr name="indicatorTextSize" format="dimension" />
        <!-- 指示器文字被选中后的大小 -->
        <attr name="selectedIndicatorTextSize" format="dimension" />
    </declare-styleable>

Example

    ViewPager mViewPager = (ViewPager) findViewById(R.id.viewpager);
    mViewPager.setAdapter(new ViewPagerAdapter());
    FlymeTabStrip tabStrip = (FlymeTabStrip) findViewById(R.id.tabstrip);
    tabStrip.setViewPager(mViewPager);

Sample

Sample sources

Sample APK