CircularPulsingButton

Additional

Language
Java
Version
N/A
Created
Dec 6, 2016
Updated
Nov 8, 2019 (Retired)
Owner
Mostafa (MostafaNasiri)
Contributor
Mostafa (MostafaNasiri)
1
Activity
Badge
Generate
Download
Source code

Circular Pulsing Button (This library is no longer maintained)

A simple circular button for Android that has a pulsing effect when you click on it.

How to Add the Library

This library is availabe in the jcenter repository. Simply add this line of code in your dependencies:

compile 'ir.sohreco.circularpulsingbutton:circular-pulsing-button:1.1.1'

How to Use

You can see an example of adding this button in your layouts in the code below:

<ir.sohreco.circularpulsingbutton.CircularPulsingButton
        android:layout_width="200dp"
        android:layout_height="200dp"
        android:layout_centerInParent="true"
        app:cpb_text="Hello World!"
        app:cpb_zoomOutScale="0.5"
        app:cpb_zoomInScale="1.5"
        app:cpb_animationDuration="300"/>

Note that zoomOutScale must be a float value between 0 and 1.
zoomInScale must be a float value between 1 and 2. Button size gets smaller when you increase zoomInScale.