Giter Site home page Giter Site logo

hyb1234hi / flowhelper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lilltezheng/flowhelper

0.0 0.0 0.0 6.15 MB

TabFlowHelper 可以帮助您迅速构建Tab,比如热搜、搜索记录、与ViewPager搭配的工具类;FlowHelper helps you quickly build tabs, such as hot searches, search logs, and utility classes that go with the ViewPager;

License: Apache License 2.0

Java 100.00%

flowhelper's Introduction

FlowHelper

FlowHelper 可以帮助您迅速构建Tab,比如热搜、搜索记录、与ViewPager搭配的工具类;

具体原理可参考着四篇文章:

如果你也想自己写一个,可以参考以下几篇文章

实现一个可定制化的TabFlowLayout(一) -- 测量与布局

实现一个可定制化的TabFlowLayout(二) -- 实现滚动和平滑过渡

实现一个可定制化的TabFlowLayout(三) -- 动态数据添加与常用接口封装

实现一个可定制化的TabFlowLayout(四) -- 与ViewPager 结合,实现炫酷效果

实现一个可定制化的TabFlowLayout -- 原理篇

实现一个可定制化的TabFlowLayout -- 说明文档

FlowLayout 和 Recyclerview 实现双联表联动

如果您也想快速实现 Banner 轮播图,可以使用这个库 https://github.com/LillteZheng/ViewPagerHelper

工程实际使用 - 玩Android 客户端 : https://github.com/LillteZheng/WanAndroid

使用

allprojects {
    repositories {
       ...
        maven { url 'https://jitpack.io' }
        
    }
}
implementation 'com.github.LillteZheng:FlowHelper:v1.22'

如果要支持 AndroidX ,如果你的工程已经有以下代码,直接关联即可:

android.useAndroidX=true
#自动支持 AndroidX 第三方库
android.enableJetifier=true

TabFlowLayout 效果图

没有结合ViewPager 结合ViewPager
竖直效果

目前TabFlowLayout 支持以下效果:

  • 矩形
  • 三角形
  • 圆角
  • shape 或者 bitmap 等资源
  • 自定义功能
  • 放大Item效果,与上述效果可共用
  • 颜色渐变效果,需要使用 TabColorTextView 控件,与上述效果可共用,只支持有viewpager 的情况
  • 竖直效果,需要设置 tab_orientation = vertical
  • 宽度均分

TabFlowLayout 使用说明

LabelFlowLayout 效果图

LabelFlowLayout LabelFlowLayout 显示更多

LabelFlowLayout 支持以下效果:

  • 单选
  • 多选
  • 长按
  • 显示更多
  • 收起

LabelFlowLayout 使用说明

其实TabFlowLayout也可以支持底部导航栏,但其实没必要,可以参考这个库 https://github.com/LillteZheng/CusBottomHelper

底部凸起 结合ViewPager

如果该项目对您有帮助,赞赏一下吧 ^_^

参考

本工程参考以下优秀项目:

鸿洋的 flowLayout

Flyco 大佬的TabLayout

flowhelper's People

Contributors

lilltezheng 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.