Git Product home page Git Product logo

water-wave-animation-android's Introduction

Water-Wave-Animation-Android

Water Wave Animation a wave-like progressbar in Android which has four shapes, circle, square, heart and star.

Add Gradle Files

Add following lines in project gradle file
repositories {
    google()
    mavenCentral()
    maven { url 'https://jitpack.io' }
}

Add following dependency in app gradle file
 implementation 'com.github.orbitalsonic:Water-Wave-Animation-Android:1.0.0'
 

XML

<com.orbitalsonic.waterwave.WaterWaveView
       android:id="@+id/waterWaveView"
       android:layout_width="200dp"
       android:layout_height="200dp"
       app:animatorEnable="true"
       app:textHidden="false"
       app:shapeType="circle"
       app:frontColor="#80c5fc"
       app:behideColor="#90cbf9"
       app:borderColor="#000000"
       app:borderWidthSize="4dp"
       app:textColor="#018786"
       app:max="100"
       app:progress="30"
       app:strong="100"
       app:shapePadding="10dp"
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintEnd_toEndOf="parent"
       app:layout_constraintTop_toTopOf="parent"
       app:layout_constraintBottom_toBottomOf="parent"/>

Java or Kotlin

      var waterWaveView: WaterWaveView = findViewById(R.id.waterWaveView)
      waterWaveView.setShape(WaterWaveView.Shape.CIRCLE)
      waterWaveView.setHideText(false)
      waterWaveView.setTextColor(Color.parseColor("#018786"))
      waterWaveView.setFrontWaveColor(Color.parseColor("#80c5fc"))
      waterWaveView.setBehindWaveColor(Color.parseColor("#90cbf9"))
      waterWaveView.setBorderColor(Color.parseColor("#000000"))
      waterWaveView.setBorderWidth(4F)
      waterWaveView.max = 100
      waterWaveView.progress = 30
      waterWaveView.setWaveStrong(100)
      waterWaveView.setShapePadding(10F)
      waterWaveView.setAnimationSpeed(10)
      
waterWaveView listener
    waterWaveView.setListener { progress, max ->
     Toast.makeText(this, "Progress: $progress, Max: $max", Toast.LENGTH_SHORT).show()
    }

Attributes

max                     "Integer"
progress                "Integer"	
frontColor              "color"	
behideColor             "color"
borderColor             "color"
textColor               "color"
borderWidthSize         "Dimension"
strong                  "Integer"
animatorEnable          "boolean"
shapeType               "enum"
textHidden              "boolean"
shapePadding            "Dimension"

Methods

startAnimation()                    void
stopAnimation()                     void
setWaveVector(float offset)         void
setWaveOffset(int offset)           void
setShape(Shape shape)               void
setHideText(boolean hidden)         void
setStarSpikes(int count)            void
setBorderWidth(float width)         void
setShapePadding(float padding)      void
setWaveStrong(int strong)           void

Screenshots

alt text

water-wave-animation-android's People

Contributors

orbitalsonic avatar myaqoob7 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.