Giter Club home page Giter Club logo

weather_bg's Introduction

前言

最近自己想做一个天气动画的小demo,在网上找了很多雷电效果动画都不是很理想。忽然看到网上有人用flutter实现了一个,效果还不错,想着用android原生给它复刻出来。看看效果。

自定义天气背景雷电,流星,雨,雪等效果

鉴于这个背景,参考了@下位子的flutter版本天气动画插件flutter_weather_bg 实现了同等的天气雷电,流星,雨,雪等效果

先看一下整体的效果:

xtmwg-xgqu1.gif

如果想直接使用,在根build.gradle配置:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

app下的build.gradle添加依赖

dependencies {
	 implementation 'com.github.Rainvvy:Weather_Bg:v1.1'
}

可以在XML直接使用:

   <com.rainy.weahter_bg_plug.WeatherBg
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:type="heavyRainy"
        />

也可以通过代码使用

setCotentView(new WeatherBg(this,WeatherUtil.WeatherType.heavyRainy));

具体包括的类型:

  • heavyRainy
  • heavySnow
  • middleSnow
  • thunder
  • lightRainy
  • lightSnow
  • sunnyNight
  • sunny
  • cloudy
  • cloudyNight
  • middleRainy
  • hazy
  • foggy
  • overcast
  • dusty

关于作者

鸣谢

感谢@下位子提供的支持和参考。

flutter_weather_bg

License

MIT

weather_bg's People

Contributors

rainvvy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.