Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
w-zm committed Jun 1, 2016
0 parents commit 1475f31
Show file tree
Hide file tree
Showing 57 changed files with 1,686 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 62 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
35 changes: 35 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "com.example.wzm.helloweather"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'

compile 'com.android.support:design:23.1.1'
compile 'com.baoyz.pullrefreshlayout:library:1.2.0'
compile 'com.android.support:recyclerview-v7:23.2.1'

compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'

}
17 changes: 17 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in E:\Users\wzm\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.wzm.helloweather;

import android.app.Application;
import android.test.ApplicationTestCase;

/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
23 changes: 23 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.wzm.helloweather">

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".activity.EntryActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.WelcomeActivty" />
<activity android:name=".MainActivity"></activity>
</application>

</manifest>
65 changes: 65 additions & 0 deletions app/src/main/java/com/example/wzm/helloweather/Contants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package com.example.wzm.helloweather;

/**
* Created by wzm on 2016/5/29.
*/
public class Contants {
public static final String SUNNY_URL = "http://files.heweather.com/cond_icon/100.png";
public static final String CLOUDY_URL = "http://files.heweather.com/cond_icon/101.png";
public static final String FEW_CLOUDS_URL = "http://files.heweather.com/cond_icon/102.png";
public static final String PARTLY_CLOUDY_URL = "http://files.heweather.com/cond_icon/103.png";
public static final String OVERCAST_URL = "http://files.heweather.com/cond_icon/104.png";
public static final String WINDY_URL = "http://files.heweather.com/cond_icon/200.png";
public static final String CALM_URL = "http://files.heweather.com/cond_icon/201.png";
public static final String LIGHT_BREEZE_URL = "http://files.heweather.com/cond_icon/202.png";
public static final String MODERATE_URL = "http://files.heweather.com/cond_icon/203.png";
public static final String FRESH_BREEZE_URL = "http://files.heweather.com/cond_icon/204.png";
public static final String STRONG_BREEZE_URL = "http://files.heweather.com/cond_icon/205.png";
public static final String HIGHT_WIND_URL = "http://files.heweather.com/cond_icon/206.png";
public static final String GALE_URL = "http://files.heweather.com/cond_icon/207.png";
public static final String STRONG_GALE_URL = "http://files.heweather.com/cond_icon/208.png";
public static final String STORM1_URL = "http://files.heweather.com/cond_icon/209.png";
public static final String VIOLENT_STORM_URL = "http://files.heweather.com/cond_icon/210.png";
public static final String HURRICANE_URL = "http://files.heweather.com/cond_icon/211.png";
public static final String TORNADO_URL = "http://files.heweather.com/cond_icon/212.png";
public static final String TROPICAL_STORM_URL = "http://files.heweather.com/cond_icon/213.png";
public static final String SHOWER_RAIN_URL = "http://files.heweather.com/cond_icon/300.png";
public static final String HEAVY_SHOWER_RAIN_URL = "http://files.heweather.com/cond_icon/301.png";
public static final String THUNDERSHOWER_URL = "http://files.heweather.com/cond_icon/302.png";
public static final String HEAVY_THUNDERSTORM_URL = "http://files.heweather.com/cond_icon/303.png";
public static final String HAIL_URL = "http://files.heweather.com/cond_icon/304.png";
public static final String LIGHT_RAIN_URL = "http://files.heweather.com/cond_icon/305.png";
public static final String MODERATE_RAIN_URL = "http://files.heweather.com/cond_icon/306.png";
public static final String HEAVY_RAIN_URL = "http://files.heweather.com/cond_icon/307.png";
public static final String EXTREME_RAIN_URL = "http://files.heweather.com/cond_icon/308.png";
public static final String DRIZZLE_RAIN_URL = "http://files.heweather.com/cond_icon/309.png";
public static final String STORM2_URL = "http://files.heweather.com/cond_icon/310.png";
public static final String HEAVY_STORM_URL = "http://files.heweather.com/cond_icon/311.png";
public static final String SEVERE_STORM_URL = "http://files.heweather.com/cond_icon/312.png";
public static final String FREEZING_RAIN_URL = "http://files.heweather.com/cond_icon/313.png";
public static final String LIGHT_SNOW_URL = "http://files.heweather.com/cond_icon/400.png";
public static final String MODERATE_SNOW_URL = "http://files.heweather.com/cond_icon/401.png";
public static final String HEAVY_SNOW_URL = "http://files.heweather.com/cond_icon/402.png";
public static final String SNOWSTORM_URL = "http://files.heweather.com/cond_icon/403.png";
public static final String SLEET_URL = "http://files.heweather.com/cond_icon/404.png";
public static final String RAIN_AND_SNOW_URL = "http://files.heweather.com/cond_icon/405.png";
public static final String SHOWER_SNOW_URL = "http://files.heweather.com/cond_icon/406.png";
public static final String SNOW_FLURRY_URL = "http://files.heweather.com/cond_icon/407.png";
public static final String MIST_URL = "http://files.heweather.com/cond_icon/500.png";
public static final String FOGGY_URL = "http://files.heweather.com/cond_icon/501.png";
public static final String HAZE_URL = "http://files.heweather.com/cond_icon/502.png";
public static final String SAND_URL = "http://files.heweather.com/cond_icon/503.png";
public static final String DUST_URL = "http://files.heweather.com/cond_icon/504.png";
public static final String VOLCANIC_ASH_URL = "http://files.heweather.com/cond_icon/506.png";
public static final String DUSTSTORM_URL = "http://files.heweather.com/cond_icon/507.png";
public static final String SANDSTORM_URL = "http://files.heweather.com/cond_icon/508.png";
public static final String COLD_URL = "http://files.heweather.com/cond_icon/901.png";
public static final String HOT_URL = "http://files.heweather.com/cond_icon/900.png";
public static final String UNKNOWN_URL = "http://files.heweather.com/cond_icon/999.png";

public static final String BASE_URL = "https://api.heweather.com/x3/";

public static final String KEY = "2596fced2ee9414b9260bb63cc569028";

public static final int NETWORK_CALLBACK = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.example.wzm.helloweather.Interface;

import com.example.wzm.helloweather.model.WeatherAPI;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
* Created by wzm on 2016/6/1.
*/
public interface IWeather {
@GET("weather")
Call<WeatherAPI> getWeatherAPI(@Query("city") String cityName, @Query("key") String key);
}
Loading

0 comments on commit 1475f31

Please sign in to comment.