• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 6 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

☔A rainy rainy rainy view.

RainyView

Download Api reqeust Apache License 2.0 Blog

A rainy rainy rainy view. ( ˘•灬•˘ )

More

中文


gif1


gif2


Usage

Gradle

Add it in your app build.gradle at the end of repositories:

dependencies {
    implementation 'me.samlss:rainyview:1.0.0'
}

Maven

<dependency>
  <groupId>me.samlss</groupId>
  <artifactId>rainyview</artifactId>
  <version>1.0.0</version>
  <type>pom</type>
</dependency>

In layout.xml

    <me.samlss.view.RainyView
          app:left_cloud_color="#B7AC8D"
          app:right_cloud_color="#9b8f84"
          app:raindrop_color="#9aa9bb"
          app:raindrop_creation_interval="10"
          app:raindrop_max_number="50"
          app:raindrop_max_length="50"
          app:raindrop_min_length="20"
          app:raindrop_min_speed="1"
          app:raindrop_max_speed="3"
          app:raindrop_size="15"
          app:raindrop_slope="-4"
          android:layout_weight="1"
          android:layout_width="0dp"
          android:layout_height="match_parent" />

In code

rainyView.setLeftCloudColor(Color.parseColor("#B7AC8D")); //Set the color of the left cloud
rainyView.setRightCloudColor(Color.parseColor("#9b8f84")); //Set the color of the right cloud
rainyView.setRainDropColor(Color.parseColor("#9aa9bb")); //Set the color of the raindrop
rainyView.setRainDropMaxNumber(50); //Set the max number of the raindrop
rainyView.setRainDropMaxLength(50); //Set the max length of the raindrop
rainyView.setRainDropMinLength(20); //Set the min length of the raindrop
rainyView.setRainDropMaxSpeed(3); //Set the max speed of the raindrop
rainyView.setRainDropMinSpeed(1); //Set the min speed of the raindrop
rainyView.setRainDropSlope(-4); //Set the slope of the raindrop
rainyView.setRainDropCreationInterval(10); //Set the creation interval of the raindrop

rainyView.start(); //Start animation
rainyView.stop(); //Stop animation
rainyView.release(); //Release the rainy view

attr

    <declare-styleable name="RainyView">
        <!--The color of raindrop-->
        <attr name="raindrop_color" format="color"></attr>

        <!--The color of the left cloud-->
        <attr name="left_cloud_color" format="color"></attr>

        <!--The color of the right cloud-->
        <attr name="right_cloud_color" format="color"></attr>

        <!--Number of raindrops that can coexist at the same time-->
        <attr name="raindrop_max_number" format="integer"></attr>

        <!--The creation of the raindrop interval in millis-->
        <attr name="raindrop_creation_interval" format="integer"></attr>

        <!--The min length in pixel of every raindrop-->
        <attr name="raindrop_min_length" format="integer"></attr>

        <!--The max length in pixel of every raindrop-->
        <attr name="raindrop_max_length" format="integer"></attr>

        <!--The size in pixel of every raindrop-->
        <attr name="raindrop_size" format="integer"></attr>

        <!--The min speed of every raindrop-->
        <attr name="raindrop_min_speed" format="float"></attr>

        <!--The max speed of every raindrop-->
        <attr name="raindrop_max_speed" format="float"></attr>

        <!--The slope of every raindrop-->
        <attr name="raindrop_slope" format="float"></attr>
    </declare-styleable>

License

Copyright 2018 samlss

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.

More Repositories

1

Broccoli

📟An Android library that shows the placeholder of the view.
Java
1,757
star
2

Lighter

💡A highlight & guide library for android.
Java
298
star
3

FunnyViews

💘A lot of funny & custom views for android, will continue to update.
296
star
4

ClockView

⏰A lovely clock view.
Java
264
star
5

TimoMenu

📋A pop-up menu for android that supports multi-row scrollable submenus.
Java
254
star
6

Bloom

🎉An android library that display bloom effect for view.
Java
134
star
7

DiceLoadingView

🎲A dice 3D rotation loading view.
Java
97
star
8

LovelyView

🔗A view that combines pictures and texts.(一个组合图片和文本的view).
Java
68
star
9

XAnimator

🐣An animation framework(一个动画框架).
Java
54
star
10

Oops

😥A library for android that help to show the layout of loading, error, empty etc.
Java
49
star
11

ActivityManager

两种方法管理应用内Activity
Java
22
star
12

CubeLoadingView

📦A cube 3D rotation loading view.
Java
18
star
13

Summary

✍Personal summary.
17
star
14

Bling

🐧A shapes fall effect library for android
Java
17
star
15

ChargingView

🔋A simple charging view.
Java
14
star
16

KeyStore

Android 密钥库系统 keystore 操作demo
Java
13
star
17

SearchPage

模仿今日头条搜索页
Java
13
star
18

PowerView

🔋A pretty charging view.
Java
12
star
19

CoffeeView

🍵A cup of coffee loading view.
Java
11
star
20

CircleProgressView

⭕A circle progress view.
Java
11
star
21

DayNightLoadingView

🌜☀🌝A loading view that switches between day and night.
Java
10
star
22

BallsLoadingView

⚽A loading view that includes four balls for animating.
Java
9
star
23

CrashLog

安卓Crash日志收集器
Java
8
star
24

Security

Android加密算法归纳
Java
8
star
25

Bubble

🎈To display a pretty bubble when touch in android.
Java
8
star
26

ClockLoadingView

🕞A clock loading view.
Java
7
star
27

BarChartLoadingView

📊A bar chart loading view that you can specify the number of bars.
Java
6
star
28

JumboLoadingView

🐥A loading(progress) view that you can select different shapes.
Java
6
star
29

IntertwineLoadingView

➰A two intertwined balls loading view.
Java
6
star
30

FlaskView

🍼A flask loading view.
Java
5
star
31

SignalLoadingView

📶A signal rotation loading view.
Java
5
star
32

PathMeasure

Android Path系列之PathMeasure+Loading效果+小车跑道移动效果
Java
5
star
33

PeasLoadingView

⭕A peas rotation loading view.
Java
5
star
34

PacmanLoadingView

👄A pacman loading view.
Java
4
star
35

Bezier

Android 自定义View系列之贝塞尔曲线+QQ未读消息拖拽效果实现+水波浪充电效果
Java
4
star
36

Paint

Android Paint 实现滤镜效果
Java
4
star
37

PinBallLoadingView

🎈A pin ball loading view.
Java
3
star
38

PaintShader

Android Paint系列基础+着色器渲染器(实现霓虹灯文字+实现圆形头像+放大镜+倒影+雷达扫描效果)
Java
3
star
39

DonutProgressView

⭕A progress view that you can use it when you are loading picture.
Java
3
star
40

FanLoadingView

🌀A fan rotation loading view(一个风扇旋转的loading view).
Java
2
star
41

PaintXfermode

Android Paint系列之Xfermode + 刮刮卡效果实现
Java
1
star
42

WhirlLoadingView

🍩A loading view that includes two rotating arcs.
Java
1
star