Pulsating Ripple

Een simpele Android Library met meerdere aanpasbare opties om het naar je eigen wensen te maken.

Documentatie om de library te kunnen gebruiken in je Android app is hier te vinden, of volg de meest recente documentatie op de GitHub pagina.

Repository

Voeg onderstaande toe aan je build.gradle (niet de module):

allprojects { repositories { ... maven { url "https://jitpack.io" } }}
Code language: JSON / JSON with Comments (json)
Dependency

Voeg onderstaande toe aan je module build.gradle (controleer de laatste versie op de GitHub repository):

dependencies { ... implementation 'com.github.invissvenska:Pulsating-Ripple:VERSION'}
Code language: JSON / JSON with Comments (json)
Configuratie

Voeg de PulsatingLayout toe aan je layout:

<nl.invissvenska.pulsatingripple.PulsatingLayout android:id="@+id/ripple" android:layout_width="match_parent" android:layout_height="match_parent" app:pr_duration="3000" // Time in ms for one animation cycle. Optional, default is 3000 app:pr_rippleAmount="10" // Amount of ripples in the animation cycle. Optional, default is 6 app:pr_radius="64dp" // Start radius of the ripple. Optional, default is 24dp app:pr_scale="3" // Scale increment of the radius. Optional, default is 6 app:pr_color="#000000" // optional app:pr_type="strokeRipple" // Stroke (strokeRipple) or filled (fillRipple) ripples, Optional, default is 'fillRipple' app:pr_strokeWidth="4dp" // Width of stroke when using 'type=stroke' otherwise field is ignored. Optional, default is 2dp> <ImageView android:id="@+id/centerImage" android:layout_width="36dp" android:layout_height="36dp" android:layout_centerInParent="true" android:src="@drawable/atom_icon"/></nl.invissvenska.pulsatingripple.PulsatingLayout>
Code language: HTML, XML (xml)

Start de animatie:

pulsatingLayout.startAnimation();
Code language: Java (java)

Stop de animatie:

pulsatingLayout.stopAnimation();
Code language: Java (java)

Bekijk de GitHub repository voor meer voorbeelden, de actuele documentatie en meest recente versies.