Giter Club home page Giter Club logo

coffeeheader's Introduction

CoffeeHeader,一个搅拌咖啡效果的下拉刷新Header。

使用方式:

添加依赖:(需配合SmartRefreshLayout使用)

implementation 'com.wuyr:coffeeheader:1.0.1'

APIs:

Method Description
updateSize(int cupRadius) 更新杯子半径
updateSize(int width, int height, int cupRadius) 更新Drawable尺寸和杯子半径
setCupBodyColor(int color) 设置杯身颜色
setCupBottomColor(int color) 设置杯底颜色
setCoffeeColor(int color) 设置咖啡颜色
setHandColor(int color) 设置手颜色
setStickColor(int color) 设置搅拌棒颜色
setStirringDuration(long duration) 设置搅拌一圈的时长 (默认: 500)
setHideDuration(long duration) 设置隐藏手臂动画时长 (默认: 300)
setEdgeFadeDuration(long duration) 设置咖啡边缘渐变动画时长 (默认: 500)

Attributes:

Name Format Description
coffeeColor color (默认: 咖啡色) 咖啡颜色
cupBodyColor color (默认: 白色) 杯身颜色
cupBottomColor color (默认: 青色) 杯底颜色
handColor color (默认: 棕黄) 手颜色
stickColor color (默认: 白色) 搅拌棒颜色
cupRadius dimension (默认: 总宽度的1/15) 杯子半径

Demo下载: app-debug.apk

CoffeeDrawable源码地址: https://github.com/Ifxcyr/CoffeeDrawable

效果图:

preview preview

coffeeheader's People

Contributors

wuyr avatar

Stargazers

 avatar chen avatar Wayne avatar Jooyer avatar Tijn avatar  avatar Jowan avatar  avatar hubin avatar

Watchers

James Cloos avatar  avatar

Forkers

uotogk

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.