# miuiweatherline **Repository Path**: eebb_ldx/miuiweatherline ## Basic Information - **Project Name**: miuiweatherline - **Description**: 鸣谢作者: Github:https://github.com/CCY0122/miuiweatherline 作者blog和详细介绍:https://blog.csdn.net/ccy0122/article/details/76464825 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # miuiweatherline 仿小米MIUI8天气24小时预报折线图控件
源码解析博客地址
[http://blog.csdn.net/ccy0122/article/details/76464825](http://blog.csdn.net/ccy0122/article/details/76464825)
## 效果预览 ![image1](https://github.com/CCY0122/miuiweatherline/blob/master/someImages/complete1.png) ![image2](https://github.com/CCY0122/miuiweatherline/blob/master/someImages/weatherGif%20_1.gif) ## 使用方法 xml:
```xml (可选,背景色) ```
code:
使用`com.example.ccy.miuiweatherline.WeatherBean`作为元数据:
```java weatherView = (MiuiWeatherView) findViewById(R.id.weather); List data = new ArrayList<>();  //add your WeatherBean to data WeatherBean b1 = new WeatherBean(WeatherBean.SUN,20,"05:00"); WeatherBean b2 = new WeatherBean(WeatherBean.RAIN,22,"日出","05:30");  //b3、b4...bn  data.add(b1); data.add(b2); weatherView.setData(data); ``` *(代码很少,建议直接copy,因为大家应该大概率会去修改/增加源码的天气icon、天气类型等)*