WindView
项目地址:
AhmadNemati/WindView
简介:WindView is an Android Library to show Weather's Wind & pressure Status
标签:
WindView is an Android Library to show Weather's Wind & pressure Status
Screenshot
Demo
Setup
Step 1: Add it as a Dependency in Your Root'sbuild.gradle
File
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
- add this to your app
build.gradle
:
dependencies {
compile 'com.github.AhmadNemati:WindView:1.1.1'
}
Step 2: Add it to your Layout
<com.github.ahmadnemati.wind.WindView
android:id="@+id/windview"
android:layout_width="match_parent"
android:layout_height="106dp"
app:barometerTickSpacing="9dp"
app:bigPoleX="38dp"
app:labelFontSize="12sp"
app:numericFontSize="25sp"
app:poleBottomY="98dp"
app:pressureLineY="73dp"
app:pressureTextX="12dp"
app:pressureTextY="4dp"
app:smallPoleX="75dp"
app:windTextX="10dp"
app:windTextY="29dp" />
Step 3: Initialize WindView and Start it
WindView windView= (WindView) findViewById(R.id.windview);
windView.setPressure(20);
windView.setPressureUnit("in Hg");
windView.setWindSpeed(1);
windView.setWindSpeedUnit(" km/h");
windView.setTrendType(TrendType.UP);
windView.start();
Note
Graphical implementations are based on Yahoo Weather Service
Developed By
- Ahmad Nemati