Commit
- Loading branch information
There are no files selected for viewing
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#RxWeather | ||
|
||
![](http://upload-images.jianshu.io/upload_images/268450-f83f74893e35b51b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) | ||
|
||
**Architecting Android with RxJava** | ||
|
||
|
||
|
||
----------------- | ||
|
||
|
||
感谢[saulmm](https://github.com/saulmm): | ||
|
||
- [Material-Movies](https://github.com/saulmm/Material-Movies) | ||
|
||
感谢[android10](https://github.com/android10): | ||
|
||
- [Architecting Android…The clean way?](http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/) | ||
|
||
- [Architecting Android…The evolution](http://fernandocejas.com/2015/07/18/architecting-android-the-evolution/) | ||
|
||
通过解读两个非常优秀开发者的文章和项目,加入了Rxbus。 | ||
|
||
公开API接口采用[和风天气](http://www.heweather.com/) | ||
|
||
----------------- | ||
|
||
项目整体基于[Model View Presenter](http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter),虽然实现了一些转场动画,但是很抱歉,目前这个版本并没有遵循[Material Design](http://www.google.com/design/spec/material-design/introduction.html)设计规范 : ( | ||
|
||
|
||
|
||
**结构分层:** | ||
|
||
- **presentation:** Presenters、Views、ErrorHanding | ||
|
||
- **usercase:** UseCase | ||
|
||
- **model:** Service、Response、Entities | ||
|
||
- **common:** Util、Constants、BusEvent、Rxbus、RxAndroid | ||
|
||
----------------- | ||
|
||
|
||
欢迎关注我的[博客](http://www.jianshu.com/users/df40282480b4)和[新郎微博](http://weibo.com/5367097592/profile?rightmod=1&wvr=6&mod=personinfo) | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.3.0' | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
jcenter() | ||
} | ||
} | ||
|
||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 23 | ||
buildToolsVersion "23.0.1" | ||
|
||
defaultConfig { | ||
minSdkVersion 14 | ||
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' | ||
|
||
/*ReactiveX library*/ | ||
compile 'io.reactivex:rxjava:1.0.3' | ||
compile 'com.trello:rxlifecycle:0.3.0' | ||
compile 'com.trello:rxlifecycle-components:0.3.0' | ||
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0' | ||
compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.3.0' | ||
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.3.0' | ||
compile 'com.jakewharton.rxbinding:rxbinding-recyclerview-v7:0.3.0' | ||
compile 'com.jakewharton.rxbinding:rxbinding-design:0.3.0' | ||
} |
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:\Android_AllSdk/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.joker.rxweather.common; | ||
|
||
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); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.joker.rxweather.common"> | ||
|
||
<application android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:supportsRtl="true" | ||
> | ||
|
||
</application> | ||
|
||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.joker.rxweather.common; | ||
|
||
/** | ||
* Created by Joker on 2015/10/31. | ||
*/ | ||
public class Constants { | ||
|
||
public static final String LOCATION_KEY = "28bcdd84fae25699606ffad27f8da77b"; | ||
public static final String FORECAST_KEY = "29fa754431304550b49cc3187c58cb06"; | ||
|
||
public static final String LOCATION_BASE_URL = "http://api.map.baidu.com"; | ||
public static final String FORECAST_BASE_URL = "https://api.heweather.com/x3"; | ||
public static final String ICON_URL = "http://files.heweather.com/cond_icon/"; | ||
|
||
public static final String J_URL = "http://www.jianshu.com/users/df40282480b4/latest_articles"; | ||
|
||
public static final int LOCATION_TAG = 0; | ||
public static final int FORECAST_TAG = 1; | ||
|
||
public static final String CACHE = "CACHE"; | ||
public static final String CACHE_CITY = "CACHE_CITY"; | ||
|
||
public static final String RECT = "RECT"; | ||
public static final String POINT = "POINT"; | ||
|
||
public static final String RESULT_STATUS_OK = "ok"; | ||
public static final String RESULT_STATUS_UNKNOW_CITY = "unknown city"; | ||
|
||
public static final int MILLISECONDS_300 = 300; | ||
public static final int MILLISECONDS_400 = 400; | ||
public static final int MILLISECONDS_600 = 600; | ||
|
||
public static final long TIME_OUT = 8 * 1000; | ||
|
||
public static final int[] colors = new int[] { | ||
android.R.color.holo_green_light, android.R.color.holo_blue_light, | ||
android.R.color.holo_green_light, android.R.color.holo_blue_light | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.joker.rxweather.common.event; | ||
|
||
/** | ||
* Created by Joker on 2015/10/31. | ||
*/ | ||
public class FinishActEvent { | ||
} |