Skip to content

Commit

Permalink
Added Tropical Cyclones Archive endpoint and point data layer support.
Browse files Browse the repository at this point in the history
Added Air Quality and Air Quality Summary endpoints and map layers support.
Added Air Quality demo view.
Updated with SDK v2.6.0 libs.
  • Loading branch information
sshie committed Sep 25, 2018
1 parent 8166575 commit 209e3c8
Show file tree
Hide file tree
Showing 13 changed files with 624 additions and 64 deletions.
4 changes: 2 additions & 2 deletions AerisDemo/AerisDemo.iml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@
<orderEntry type="library" name="Gradle: com.android.support:support-v4-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support.test:runner-1.0.2" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-basement-15.0.1" level="project" />
<orderEntry type="library" name="Gradle: com.aerisweather:aeris-maps-lib-2.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: com.android.support.test.espresso:espresso-idling-resource-2.2.2" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.aerisweather:aeris-maps-lib-2.6.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:27.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat-27.1.1" level="project" />
Expand All @@ -125,7 +125,7 @@
<orderEntry type="library" name="Gradle: junit:junit:4.12@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime-1.1.0" level="project" />
<orderEntry type="library" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.aerisweather:aeris-core-lib-2.5.0" level="project" />
<orderEntry type="library" name="Gradle: com.aerisweather:aeris-core-lib-2.6.0" level="project" />
<orderEntry type="library" name="Gradle: com.android.support.test:monitor-1.0.2" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:appcompat-v7-27.1.1" level="project" />
<orderEntry type="library" name="Gradle: com.google.android.gms:play-services-maps-15.0.1" level="project" />
Expand Down
10 changes: 5 additions & 5 deletions AerisDemo/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ android {
defaultConfig {
minSdkVersion 19
applicationId "com.example.demoaerisproject"
versionCode 9
versionCode 10
targetSdkVersion 27
versionName "2.5.0"
versionName "2.6.0"
//multiDexEnabled true
signingConfigs {
config {
Expand Down Expand Up @@ -59,7 +59,7 @@ buildscript {
mavenCentral()
google()
jcenter()
// maven { url maven_staging_url }
maven { url maven_staging_url }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
Expand All @@ -70,11 +70,11 @@ repositories {
mavenCentral()
google()
jcenter()
// maven { url maven_staging_url }
maven { url maven_staging_url }
}
dependencies {
testImplementation 'junit:junit:4.12'
implementation ('com.aerisweather:aeris-maps-lib:2.5.0@aar') {
implementation ('com.aerisweather:aeris-maps-lib:2.6.0@aar') {
transitive true
}
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
Expand Down
2 changes: 1 addition & 1 deletion AerisDemo/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

org.gradle.jvmargs=-Xmx2048M

maven_staging_url=https://oss.sonatype.org/content/repositories/comaerisweather-1586
maven_staging_url=https://oss.sonatype.org/content/repositories/comaerisweather-1613
113 changes: 113 additions & 0 deletions AerisDemo/res/layout/listview_pollutant.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/light_gray"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="25dp"
android:layout_marginStart="25dp"
android:background="@color/light_gray"
android:orientation="horizontal"
android:padding="5dp">

<TextView
android:id="@+id/tvPollutantName"
android:layout_width="255dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="5dp"
android:text="Particle Matter (2.5um)"
android:textColor="#ffffff"
android:textSize="12sp"/>

<TextView
android:id="@+id/tvPollutantCategory"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Good"
android:textColor="#ffffff"
android:textSize="12sp"
android:textStyle="bold"/>

<TextView
android:id="@+id/tvPollutantValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:paddingRight="5dp"
android:text="34"
android:textColor="#ffffff"
android:textSize="12sp"
android:textStyle="bold"/>

</LinearLayout>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="25dp"
android:layout_marginStart="50dp"
android:background="@color/light_gray"
android:orientation="horizontal"
android:padding="5dp">

<TextView
android:id="@+id/tvPollutantPPB"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="5dp"
android:text="PPB:"
android:textColor="#ffffff"
android:textSize="10sp"/>

<TextView
android:id="@+id/tvPollutantPPB_Value"
android:layout_width="180dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="3.2"
android:textColor="#ffffff"
android:textSize="10sp"
android:textStyle="bold"/>

<TextView
android:id="@+id/tvPollutantUGM3"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingRight="5dp"
android:text="UGM3:"
android:textColor="#ffffff"
android:textSize="10sp"/>

<TextView
android:id="@+id/tvPollutantUGM3Value"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="2"
android:paddingRight="5dp"
android:text="12"
android:textColor="#ffffff"
android:textSize="10sp"
android:textStyle="bold"/>

</LinearLayout>

<View
android:id="@+id/viewSpacer"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginEnd="25dp"
android:layout_marginStart="25dp"
android:layout_weight="1"
android:background="@color/spacer"/>

</LinearLayout>
119 changes: 119 additions & 0 deletions AerisDemo/res/layout/view_airquality.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:background="@drawable/card_shape">

<TextView
android:id="@+id/tvPlace"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_marginTop="10dp"
android:text="--"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="bold"/>

<TextView
android:id="@+id/tvTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginEnd="15dp"
android:layout_marginTop="10dp"
android:text="--"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="bold"/>

<ImageView
android:id="@+id/ivAirQualityIcon"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_below="@+id/tvPlace"
android:layout_marginStart="15dp"
android:layout_marginTop="15dp"
android:scaleType="fitXY"/>

<TextView
android:id="@+id/tvCategory"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvPlace"
android:layout_marginLeft="15dp"
android:layout_marginTop="11dp"
android:layout_toEndOf="@+id/ivAirQualityIcon"
android:text="Good"
android:textColor="#ffffff"
android:textSize="36sp"/>

<TextView
android:id="@+id/tvAirQuality"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_below="@+id/tvTime"
android:layout_marginEnd="15dp"
android:layout_marginTop="11dp"
android:text="--"
android:textColor="#ffffff"
android:textSize="36sp"
android:textStyle="bold"/>

<View
android:id="@+id/viewSpacer"
android:layout_width="wrap_content"
android:layout_height="2dp"
android:layout_below="@+id/tvAirQuality"
android:layout_marginEnd="5dp"
android:layout_marginLeft="5dp"
android:layout_marginTop="10dp"
android:background="@color/spacer"/>

<TextView
android:id="@+id/tvMethod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/viewSpacer"
android:layout_centerHorizontal="false"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:text="Method of Calculation: "
android:textColor="#ffffff"/>

<TextView
android:id="@+id/tvDominant"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvMethod"
android:layout_centerHorizontal="false"
android:layout_marginBottom="5dp"
android:layout_marginStart="15dp"
android:layout_marginTop="5dp"
android:text="Dominant Pollutant: "
android:textColor="#ffffff"/>

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tvDominant"
android:layout_marginBottom="25dp"
android:layout_marginTop="10dp"
android:isScrollContainer="true">

<LinearLayout
android:id="@+id/llPollutants"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:isScrollContainer="false"
android:orientation="vertical">

</LinearLayout>
</ScrollView>


</RelativeLayout>
2 changes: 2 additions & 0 deletions AerisDemo/res/values/nav_menu_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<item>Weekend Forecast</item>
<item>Interactive Maps</item>
<item>Sun/Moon</item>
<item>Air Quality</item>

</string-array>

<!-- Nav Drawer List Item Icons -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import com.example.db.MyPlacesDb.PlacesColumns;
import com.example.db.MyPlacesSubject;
import com.example.db.MyPlacesSubject.MyPlacesObserver;
import com.example.fragment.AirQualityFragment;
import com.example.fragment.ExtForecastFragment;
import com.example.fragment.HeadlessFragment;
import com.example.fragment.MyMapFragment;
Expand Down Expand Up @@ -275,6 +276,11 @@ public void displayView(int position)
fragment = new CustomSunmoonFragment();
break;
}
case 7:
{
fragment = new AirQualityFragment();
break;
}
default:
break;
}
Expand Down
Loading

0 comments on commit 209e3c8

Please sign in to comment.