-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复程序崩溃问题,修复多次请求网络的问题,更改网络访问框架,采用OkHttp+Retrofit+RxJava。
- Loading branch information
1 parent
db216a1
commit 90842db
Showing
52 changed files
with
2,079 additions
and
601 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
171 changes: 86 additions & 85 deletions
171
app/src/main/java/com/llw/goodweather/MainActivity.java
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/llw/goodweather/NetworkRequiredInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package com.llw.goodweather; | ||
|
||
import android.app.Application; | ||
|
||
import com.llw.mvplibrary.BuildConfig; | ||
import com.llw.mvplibrary.newnet.INetworkRequiredInfo; | ||
|
||
|
||
/** | ||
* 网络访问信息 | ||
* @author llw | ||
*/ | ||
public class NetworkRequiredInfo implements INetworkRequiredInfo { | ||
|
||
private Application application; | ||
|
||
public NetworkRequiredInfo(Application application){ | ||
this.application = application; | ||
} | ||
|
||
/** | ||
* 版本名 | ||
*/ | ||
@Override | ||
public String getAppVersionName() { | ||
return BuildConfig.VERSION_NAME; | ||
} | ||
/** | ||
* 版本号 | ||
*/ | ||
@Override | ||
public String getAppVersionCode() { | ||
return String.valueOf(BuildConfig.VERSION_CODE); | ||
} | ||
|
||
/** | ||
* 是否为debug | ||
*/ | ||
@Override | ||
public boolean isDebug() { | ||
return BuildConfig.DEBUG; | ||
} | ||
|
||
/** | ||
* 应用全局上下文 | ||
*/ | ||
@Override | ||
public Application getApplicationContext() { | ||
return application; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.