Giter Site home page Giter Site logo

qqbubbleview's Introduction

QQBubbleView

Outline

利用三阶贝塞尔曲线模仿QQ空间直播时右下角的礼物冒泡特效

ScreenShot

Usage

  • 引入依赖
compile 'yasic.library.BubbleView:bubbleview:0.0.4'
  • 启动动画
void startAnimation(final int rankWidth, final int rankHeight)
void startAnimation(final int rankWidth, final int rankHeight, int count)
void startAnimation(final int rankWidth, final int rankHeight, int delay, int count)
  • 使用默认图片样式
BubbleView setDefaultDrawableList()
  • 自定义图片样式
BubbleView setDrawableList(drawableList)
  • 设置上升动画持续时间
BubbleView setRiseDuration(int riseDuration)
  • 设置初始点相对于底边边距
BubbleView setBottomPadding(int px)
  • 设置三个随机初始点的间距
BubbleView setOriginsOffset(int px)
  • 设置缩放动画最大最小比例
BubbleView setScaleAnimation(float maxScale, float minScale)
  • 设置两个上升动画之间的时间间隔
BubbleView setAnimationDelay(int delay)
  • 设置图片数目最大最小值
void setMaxHeartNum(int maxHeartNum)
void setMinHeartNum(int minHeartNum)
  • 设置每一个view的宽高
BubbleView setItemViewWH(int viewWidth, int viewHeight)

Point

  • 继承自Relativelayout

  • 使用三阶贝塞尔曲线模拟运动路径,三阶贝塞尔曲线公式如下

qqbubbleview's People

Contributors

yasic avatar

Watchers

James Cloos avatar  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.