21

Android--›最万能的TabLayout(不仅仅是TabLayout)

 4 years ago
source link: https://juejin.im/post/5de490375188256ec5224fbc
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Android--›最万能的TabLayout(不仅仅是TabLayout) - 掘金

2019年12月02日阅读 3674

Android--›最万能的TabLayout(不仅仅是TabLayout)

DslTabLayout

Android界最万能的TabLayout(不仅仅是TabLayout)

千呼万唤的角标功能, 终于使出来了. 赶紧体验吧!

  1. 支持任意类型的child视图.
  2. 支持任意类型Drawable指示器.
  3. 支持智能开启横向滚动.
  4. 支持高凸模式, 允许某个child高出一节显示.
  5. 支持滑动选择模式, 滑动的时候智能选择上一个下一个.
  6. 支持角标配置.

直接当做横向的LinearLayout使用方式即可, 无特殊要求.

点击查看全部属性

点击查看事件回调

点击查看角标使用

一个DSLTabLayout可实现以下3中效果

无需选择, xml配置即可, 还不赶紧收下?

带滚动效果和角标
16effd263551b65a?imageslim
普通和高凸效果
16effd2635668a08?imageslim
带边框,分割线和滑动选择效果
16effd263560eec3?imageslim

使用JitPack的方式, 引入库.

根目录中的 build.gradle

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}
复制代码

APP目录中的 build.gradle

dependencies {
    implementation 'com.github.angcyo:DslTabLayout:1.2.0'
}
复制代码

更新日志

1


群内有各(pian)种(ni)各(jin)样(qun)的大佬,等你来撩.

点此QQ对话 该死的空格 点此快速加群

开源地址

1


1

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK