Automate Blob Animation with your own custom to simplify designing Blob Animation for your Android Apps.
See the latest released Blob Animation version here.
// project level gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
// module level gradle
dependencies {
implementation 'com.github.adityaikhbalm:blobanimation:1.0'
}
<!-- <repositories> section of pom.xml -->
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<!-- <dependencies> section of pom.xml -->
<dependency>
<groupId>com.github.adityaikhbalm</groupId>
<artifactId>blobanimation</artifactId>
<version>1.0</version>
</dependency>
- Minimum Android SDK: Requires a minimum API level of 21.
Blob Animation usage is pretty simple, you just need put code in your xml layout.
Default Blob Animation, it will play Blob Animation with red background.
<com.adityaikhbalm.blobanimation.layout.BlobLayout
android:layout_width="300dp" // 300dp or whatever you want
android:layout_height="300dp" // 300dp or whatever you want />
Default Blob Animation, it will play Blob Animation with your own style.
<com.adityaikhbalm.blobanimation.layout.BlobLayout
android:layout_width="300dp" // 300dp or whatever you want
android:layout_height="300dp" // 300dp or whatever you want
app:blobLayout="@drawable/your_image" // image or color
app:blobPointCount="16"
app:blobRadius="200"
app:blobPlay="true"
app:blobDuration="2000"
app:blobOffset="100"
app:blobInterpolator="@android:anim/decelerate_interpolator" />
Blob Animation has default properties and you can modify it with your own style, here are the properties:
Property | Value Type | Default Value | Information |
---|---|---|---|
app:blobLayout | reference/color | RED Color | Image or Color of blob layout |
app:blobPointCount | integer | 7 | Number of curve points in the blob object |
app:blobRadius | float | 400 | Radius of blob object |
app:blobOffset | float | 25 | Offset of blob object |
app:blobDuration | integer | 2000 | Duration of animation |
app:blobInterpolator | reference | Linear Interpolator | Change corner radius |
app:blobPlay | boolean | true | Should animation to play or not |
- Support code programmatically
- Display preview in xml layout
This project is under MIT License. See the LICENSE file for details.