Are you tired of boring, static UIs that make your users yawn? Say goodbye to dull designs and hello to the mesmerizing world of GradientStripAnimation! This isn't just another animation library β it's a visual revolution that will have your users glued to their screens, questioning reality itself! π€―
- π Fluid, endless gradient animations that defy the laws of physics
- π¨ Customizable colors that would make a rainbow jealous
- π°οΈ Precise control over duration and delays (time is just a construct, right?)
- ποΈ Flexible strip configurations for ultimate creative freedom
- π Shadow effects so realistic, you'll question your own existence
- Boost User Engagement: Watch your retention rates skyrocket as users become hypnotized by your UI
- Stand Out from the Crowd: Leave your competitors in the dust with animations they can only dream of
- Infinite Customization: Create a unique visual identity that screams "I'm not like other apps!"
- Performance Optimized: Silky smooth animations that won't make your app break a sweat
VID_20240819020007023.mp4
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
//...
maven { url 'https://jitpack.io' }
}
}
Add the following to your project's
build.gradle
file:
dependencies {
implementation 'com.github.alex11111115:GradientStripAnimation:1.1'
}
First, make sure you have a LinearLayout
ready to be transformed into a canvas of moving art:
package com.your.app;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.widget.LinearLayout;
import com.kilobyte.gradientstripanimation.GradientStripAnimation;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends Activity {
private Context context = this;
private LinearLayout container; //Replace with your LinearLayout
private GradientStripAnimation animation;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
container = findViewById(R.id.container);
animation = new GradientStripAnimation(this, container);
}
}
Create a list of StripConfig
objects to define each strip's appearance:
List<GradientStripAnimation.StripConfig> configs = new ArrayList<>();
// Strip 1: The Ethereal Whisper
configs.add(new GradientStripAnimation.StripConfig(LinearLayout.LayoutParams.MATCH_PARENT, dpToPx(18),
new int[]{0xFF8EA3FE, 0xFFA179C6, 0xFFB44F8F, 0xFF946591, 0xFF34A79A, 0xFF8D8CD3 /*You can add more colors to infinity according to your need.*/})
.setCornerRadius(dpToPx(4))
.setEnableShadow(true)
.setShadowColor(0x66222327)
.setShadowRadius(dpToPx(1))
.setShadowDx(0)
.setShadowDy(dpToPx(0)));
// Strip 2: The Ocean's Depth
configs.add(new GradientStripAnimation.StripConfig(LinearLayout.LayoutParams.MATCH_PARENT, dpToPx(18),
new int[]{0xFF8D8CD3, 0xFF8EA3FE, 0xFFA179C6, 0xFFB44F8F, 0xFF946591, 0xFF34A79A /*You can add more colors to infinity according to your need.*/})
.setCornerRadius(dpToPx(4))
.setEnableShadow(true)
.setShadowColor(0x66222327)
.setShadowRadius(dpToPx(1))
.setShadowDx(0)
.setShadowDy(dpToPx(0)));
// Strip 3: The Celestial Dance
configs.add(new GradientStripAnimation.StripConfig(dpToPx(450), dpToPx(18),
new int[]{0xFF34A79A, 0xFF8D8CD3, 0xFF8EA3FE, 0xFFA179C6, 0xFFB44F8F, 0xFF946591 /*You can add more colors to infinity according to your need.*/})
.setCornerRadius(dpToPx(4))
.setEnableShadow(true)
.setShadowColor(0x66222327)
.setShadowRadius(dpToPx(1))
.setShadowDx(0)
.setShadowDy(dpToPx(0)));
//You can add more Strip with the features you want wherever you want.
Now, let's bring your creation to life:
new GradientStripAnimation(context, container)
.setStripConfigs(configs)
.setDuration(5000) // 5 seconds of pure visual ecstasy
.setStripDelay(150) // A tantalizing 150ms delay between strips
.setOnAnimationEndListener(() -> {
// Add your own method here so that when the animation is finished something happens like text appears etc.
}).startAnimation();
Add this method in your activity or class to convert dp to Px
private int dpToPx(int dp) {
float density = context.getResources().getDisplayMetrics().density;
return Math.round((float) dp * density);
}
- Width & Height: Go wild with
MATCH_PARENT
or specific dimensions in dp - Colors: Use an array of colors to create mind-bending gradients
- Corner Radius: From sharp edges to smooth curves, the choice is yours
- Shadows: Add depth and mystery with customizable shadows
- Duration & Delay: Fine-tune the rhythm of your visual symphony
- Increased user happiness
- Uncontrollable urges to stare at your app for hours
- Sudden realization that static UIs are a thing of the past
- Desire to redesign your entire app (or life) around these animations
- Combine multiple
GradientStripAnimation
instances for a truly psychedelic experience - Sync animations with your app's state changes for seamless transitions
- Use complementary colors for a harmonious yet striking visual impact
- Experiment with different strip counts and configurations to find your perfect balance
Don't just build apps β create experiences. With GradientStripAnimation
, you're not just a developer; you're a digital artist, a maestro of motion, a sorcerer of the screen.
So, are you ready to elevate your UI game and leave the mundane world behind? The power is in your hands. Use it wisely, and watch as your app becomes the talk of the town, the envy of your peers, and the object of your users' undying affection.
Remember: In a world of static, be the motion. In a sea of boring, be the GradientStripAnimation
. πβ¨# GradientStripAnimation
GradientStripAnimation is developed and maintained by alex11111115.
We welcome contributions from the community! If you have ideas or improvements, feel free to submit pull requests or open issues on the GitHub repository.
WavePlayerView is licensed under the Apache License 2.0.