GithubHelp home page GithubHelp logo

00mjk / dsltablayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from angcyo/dsltablayout

0.0 0.0 0.0 16.16 MB

:hearts: Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等

Home Page: https://github.com/angcyo/DslAdapter

License: MIT License

Kotlin 100.00%

dsltablayout's Introduction

DslTabLayout

♥️ Android界最万能的TabLayout(不仅仅是TabLayout). 高能自绘控件, 继承自ViewGroup, 非组合控件.

API

特性

  1. 支持任意类型的child视图.
  2. 支持任意类型Drawable指示器.
  3. 支持智能开启横向滚动.
  4. 支持智能开启平分item宽度(1.5.4后).
  5. 支持高凸模式, 允许某个child高出一节显示.
  6. 支持滑动选择模式, 滑动的时候智能选择上一个下一个.
  7. 支持角标配置.
  8. 支持ViewPagerViewPager2
  9. 支持竖向(2.0.0后)

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

入门使用

点击查看全部属性

点击查看事件回调

点击查看角标使用

关联ViewPager使用(兼容ViewPager2)

效果

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

高能自绘控件, 继承自ViewGroup, 非组合控件.

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

带滚动效果和角标
普通和高凸效果
带边框,分割线和滑动选择效果

竖向效果

使用JitPack的方式, 引入库.

根目录中的 build.gradle

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

APP目录中的 build.gradle

dependencies {
    implementation 'com.github.angcyo.DslTablayout:TabLayout:2.0.0'

    //可选
    implementation 'com.github.angcyo.DslTablayout:ViewPager1Delegate:2.0.0'
    //可选
    implementation 'com.github.angcyo.DslTablayout:ViewPager2Delegate:2.0.0'
}

更新日志

下载体验

扫码安装


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

联系作者

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

开源地址

dsltablayout's People

Contributors

angcyo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.