QQBubbleView

Outline

Using third-order Bezier curve to imitate the gift bubble effect in the lower right corner of Qzone live broadcast

ScreenShot

Usage

  • Introduction of depend on
compile; Yasic. Library. BubbleView: BubbleView: 0.0.4;Copy the code
  • Start the animation
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)
Copy the code
  • Use the default image style
BubbleView setDefaultDrawableList()
Copy the code
  • Custom image styles
BubbleView setDrawableList(drawableList)
Copy the code
  • Set the duration of the rising animation
BubbleView setRiseDuration(int riseDuration)
Copy the code
  • Sets the starting point relative to the bottom margin
BubbleView setBottomPadding(int px)
Copy the code
  • Sets the spacing of three random initial points
BubbleView setOriginsOffset(int px)
Copy the code
  • Set the maximum and minimum scale for zooming animation

BubbleView setScaleAnimation(float maxScale, float minScale)
Copy the code
  • Sets the time interval between two rising animations

  • BubbleView setAnimationDelay(int delay)
    Copy the code
    • Set the maximum and minimum number of images
    void setMaxHeartNum(int maxHeartNum)
    void setMinHeartNum(int minHeartNum)
    Copy the code
    • Set the width and height of each view
    BubbleView setItemViewWH(int viewWidth, int viewHeight)
    Copy the code

    Point

    • Inherited from Relativelayout

    • The motion path is simulated using third-order Bezier curves, which are formulated as follows

    • Check out the blog www.html-js.com/article/162…

    • Myst729.github. IO /bezier-curv…