# RainyView **Repository Path**: applibgroup/RainyView ## Basic Information - **Project Name**: RainyView - **Description**: A rainy rainy rainy view. - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-16 - **Last Updated**: 2022-01-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![.github/workflows/main.yml](https://github.com/applibgroup/RainyView/actions/workflows/main.yml/badge.svg)](https://github.com/applibgroup/RainyView/actions/workflows/main.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=applibgroup_RainyView&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=applibgroup_RainyView) # RainyView A HMOS library which provides rainy view animation ## Source Inspired by [samlss/RainyView](https://github.com/samlss/RainyView) - version 1.0 ## Feature This library provides an animation of rainy view feature. ## Dependency 1. For using rainyview module in sample app, include the source code and add the below dependencies in entry/build.gradle to generate hap/support.har. ```groovy dependencies { implementation project(':rainyview') implementation fileTree(dir: 'libs', include: ['*.har']) testImplementation 'junit:junit:4.13' } ``` 2. For using rainyview in separate application using har file, add the har file in the entry/libs folder and add the dependencies in entry/build.gradle file. ```groovy dependencies { implementation fileTree(dir: 'libs', include: ['*.har']) testImplementation 'junit:junit:4.13' } ``` 3. For using rainyview from a remote repository in separate application, add the below dependencies in entry/build.gradle file. ``` groovy dependencies { implementation 'dev.applibgroup:rainyview:1.0.0' testCompile 'junit:junit:4.13' } ``` ## Usage #### In layout.xml ```xml ``` #### In code ```java RainyView rainyView = (RainyView) findComponentById(ResourceTable.Id_rv); rainyView.setLeftCloudColor(Color.getIntColor("#B7AC8D")); //Set the color of the left cloud rainyView.setRightCloudColor(Color.getIntColor("#9b8f84")); //Set the color of the right cloud rainyView.setRainDropColor(Color.getIntColor("#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 ``` ## 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. ```