Skip to content

EmojiRainLayout is a customizable Android layout that allows developers to create a fun and interactive rain effect of emojis on the screen.

License

Notifications You must be signed in to change notification settings

AndroidWithRossyn/RainView-DropingDrawables

Repository files navigation

RainLayout Kotlin

Give a surprise to your users on Christmas Day by dropping emojis!


How to use the RainLayout:

RainLayout is a custom Android view that creates a delightful emoji rain effect on your screen.

Add EmojiRainLayout to your layout XML:

<com.youpackage.EmojiRainLayout
    android:id="@+id/emojiRainLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

In your Activity or Fragment:

val emojiRainLayout: EmojiRainLayout = findViewById(R.id.emojiRainLayout)

// Add emojis
emojiRainLayout.addEmoji(R.drawable.emoji_heart)
emojiRainLayout.addEmoji(R.drawable.emoji_smile)

// Customize (optional)
emojiRainLayout.per = 10 // Number of emojis per drop
emojiRainLayout.duration = 5000 // Total duration in milliseconds
emojiRainLayout.dropDuration = 2000 // Duration of each emoji's fall
emojiRainLayout.dropFrequency = 300 // Time between emoji drops

// Start the rain
emojiRainLayout.startDropping()

// Stop the rain (when needed)
emojiRainLayout.stopDropping()

Customization

  • per: Number of drawable per drop cycle
  • duration: Total duration of the rain effect
  • dropDuration: Duration of each drawable's falling animation
  • dropFrequency: Time interval between drawable drops

Enjoy the rain Effact in your app! 🎉

Config

  • per
    • How many emojis will dropping in each flow, default 6
  • duration
    • The total duration of the animation, default 8000ms
  • dropDuration
    • The average dropping duration for a specific emoji, default 2400ms
  • dropFrequency
    • The interval between two flows, default 500ms

Config in layout. EmojiRainLayout inherits from ConstraintLayout.


Elevate your Android app to the next level with our state-of-the-art solutions! Contact us today and let’s create something extraordinary!

Instagram LinkedIn Medium


Note: Please review our Code of Conduct before using this project.

Find this Repository useful? ❤️

Support it by joining stargazers for this repository. ⭐

Also, follow me on GitHub for my next creations! 🤩

All Repositories

☕ Fuel My Code

PayPal UPI

Your support transforms caffeine into code! ✨

🚀 Faster Updates 🔍 Better Documentation 🛠️ More Features
Why Support?

Every contribution helps me dedicate more time to creating high-quality open source Code. Your support directly translates to better software for everyone!

License

Copyright: 
~ Rossyn
~ Rohitraj Khorwal

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

About

EmojiRainLayout is a customizable Android layout that allows developers to create a fun and interactive rain effect of emojis on the screen.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages