Rainlayout

Additional

Language
Kotlin
Version
1.1 (Aug 22, 2019)
Created
Aug 21, 2019
Updated
Aug 26, 2019
Owner
Fevzi Ömür Tekin (fevziomurtekin)
Contributor
Fevzi Ömür Tekin (fevziomurtekin)
1
Activity
Badge
Generate
Download
Source code
APK file

Commercial

Rainlayout

Constraintlayout based rain-animation view developed backed by Kotlin Coroutines.



Layout

  <com.fevziomurtekin.widget.RainlayoutView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/rainview"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:background="@android:color/holo_orange_light"
        xmlns:android="http://schemas.android.com/apk/res/android"
        app:isColorful="true"
        app:dropPerSecond="1"
        app:durationOfDropTime="500"
        app:dropSrc="@drawable/umbrella"
        app:dropTintColor="@color/colorPrimary">


</com.fevziomurtekin.widget.RainlayoutView>

Attributes

Attribute Description
isColorful This attribute makes the drop colorful. You can choose true or false (by default false)
dropPerSecond This attribute determines how many drops per second. You can value the data type Int. (by default 100)
durationOfDropTime This attribute determines the number of seconds the drop will drop to the floor. You can value the data type Int-milisecond.(by default 500)
dropSrc This attribute change the view of the drop.
dropTintColor The attribute change the color of the drop (by default @android:color/white)

Warning : To Stop the animation in Activity / Fragment changes!

    override fun onStop() {
        super.onStop()
        rainview.animationClear()
    }

License

The Apache License 2.0 - see LICENSE for more details