Giter VIP home page Giter VIP logo

ypwaveview's Introduction

YPWaveViewGet it on Google Play

A wave-like progressbar on Android which has four shapes, circle, square, heart and star.

Sample

Attributes

Name Format Value
max Integer Defines the maximum value.
progress Integer Defines the default progress value, between 0 and max.
frontColor color Defines the color of the front wave.
behideColor color Defines the color of the behide wave.
borderColor color Defines the color of the border.
textColor color Defines the color of the percent text.
borderWidthSize Dimension Defines the width of the border.
strong Integer Defines the strong of the wave crest, between 0 and 100.
animatorEnable boolean Control the start of the animation.
shapeType enum Set the shape of the YPWaveView. (circle, square and heart)
textHidden boolean Set whether the percent text is hidden
shapePadding Dimension Defines the value of the shape padding.

Methods

Name Return Definition
startAnimation() void Start the animation.
stopAnimation() void Stop the animation.
setWaveVector(float offset) void Set the vector of the wave, between 0 and 100.
setWaveOffset(int offset) void Set the offset of the front and behide waves, between 0 and 100.
setShape(Shape shape) void Set the shape of the YPWaveView.(YPWaveView.Shape)
setHideText(boolean hidden) void Set whether the percent text is hidden
setStarSpikes(int count) void Set the count of spikes.
setBorderWidth(float width) void Set the width of the border.
setShapePadding(float padding) void Set the value of the shape padding.
setWaveStrong(int strong) void Set the strong of the wave crest, between 0 and 100.

XML

 <com.yangp.ypwaveview.YPWaveView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:animatorEnable="false"
        app:textHidden="false"
        app:shapeType="heart"
        app:frontColor="#1f3bed"
        app:behideColor="#4e99e6"
        app:borderColor="#ff0000"
        app:borderWidthSize="4dp"
        app:textColor="#15DF89"
        app:max="1000"
        app:progress="765"
        app:strong="100"
        app:shapePadding="30dp"/>

Download

<dependency>
  <groupId>com.yangpingapps</groupId>
  <artifactId>ypwaveview</artifactId>
  <version>1.0.4</version>
  <type>aar</type>
</dependency>

or Gradle ( mavenCentral ):

implementation 'com.yangpingapps:ypwaveview:1.0.4'

License

Copyright 2018 zih-yang lin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

ypwaveview's People

Contributors

zihyanglin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ypwaveview's Issues

Image set

How to set imageview in background and fill progress

How to check animation state?

I am using this in a fragment within viewpager2, when I leave the swipe away and come back the fragment is active, as I also have a CountDownTimer there which is working but the wave animation is stopped is there a way that I can check the animation state
so that I can start it again.

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.