Skip to content

Commit

Permalink
第三方库全部更新到目前最新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Jul 23, 2018
1 parent eaeae43 commit e0a6d59
Show file tree
Hide file tree
Showing 40 changed files with 349 additions and 140 deletions.
14 changes: 14 additions & 0 deletions .idea/assetWizardSettings.xml

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

Binary file added .idea/caches/build_file_checksums.ser
Binary file not shown.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
language: android
jdk: oraclejdk8
before_install:
- yes | sdkmanager "platforms;android-25"
- yes | sdkmanager "platforms;android-27"

env:
global:
- ANDROID_API_LEVEL=25
- ANDROID_BUILD_TOOLS_VERSION=25.0.2
- ANDROID_API_LEVEL=27
- ANDROID_BUILD_TOOLS_VERSION=27.0.3
- TRAVIS_SECURE_ENV_VARS=true

android:
Expand All @@ -25,4 +25,4 @@ android:

script:
- ./gradlew clean
- ./gradlew assembleDebug
- ./gradlew assembleDebug
39 changes: 19 additions & 20 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
The MIT License (MIT)
Copyright (c) 2017 Jenly Yu
https://github.com/jenly1314

The MIT License (MIT)
Copyright (c) 2017 Jenly Yu
https://github.com/jenly1314
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# MVPFrame
[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/MVPFrame/master/app/app-release.apk)
[![Download](https://img.shields.io/badge/download-App-blue.svg)](https://raw.githubusercontent.com/jenly1314/MVPFrame/master/app/release/app-release.apk)
[![](https://jitpack.io/v/jenly1314/MVPFrame.svg)](https://jitpack.io/#jenly1314/MVPFrame)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)
[![Blog](https://img.shields.io/badge/blog-Jenly-9933CC.svg)](http://blog.csdn.net/jenly121)
Expand All @@ -16,17 +16,17 @@ MVPFrame for Android 是一个集合了 Retrofit2 + RXJava2 + OkHttp3 + Mosby3
<dependency>
<groupId>com.king.frame</groupId>
<artifactId>mvpframe</artifactId>
<version>1.0.6</version>
<version>1.1.0</version>
<type>pom</type>
</dependency>
```
### Gradle:
```gradle
compile 'com.king.frame:mvpframe:1.0.6'
compile 'com.king.frame:mvpframe:1.1.0'
```
### Lvy:
```lvy
<dependency org='com.king.frame' name='mvpframe' rev='1.0.6'>
<dependency org='com.king.frame' name='mvpframe' rev='1.1.0'>
<artifact name='$AID' ext='pom'></artifact>
</dependency>
```
Expand All @@ -42,24 +42,24 @@ allprojects {

## 引入的库:
```gradle
compileOnly 'com.android.support:support-v4:27.1.1'
compileOnly 'com.android.support:appcompat-v7:27.1.1'
// Model-View-Intent
compile 'com.hannesdorfmann.mosby3:mvi:3.0.4'
api 'com.hannesdorfmann.mosby3:mvi:3.1.0'
// Plain MVP
compile 'com.hannesdorfmann.mosby3:mvp:3.0.4'
api 'com.hannesdorfmann.mosby3:mvp:3.1.0'
// MVP + ViewState support
compile 'com.hannesdorfmann.mosby3:viewstate:3.0.4'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
api 'com.hannesdorfmann.mosby3:viewstate:3.1.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.9.1'
api 'com.squareup.retrofit2:retrofit:2.4.0'
api 'com.squareup.retrofit2:converter-gson:2.4.0'
api 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
compile 'io.reactivex.rxjava2:rxjava:2.1.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
api 'io.reactivex.rxjava2:rxjava:2.1.16'
api 'io.reactivex.rxjava2:rxandroid:2.0.2'
compile 'com.orhanobut:logger:1.15'
api 'com.jakewharton.timber:timber:4.7.1'
```

## 示例
Expand Down
23 changes: 11 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.king.mvpframe"
minSdkVersion 15
targetSdkVersion 25
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -24,16 +24,15 @@ configurations.all {
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'

compile project(':lib')
implementation project(':lib')

compile 'com.jakewharton:butterknife:8.6.0'
implementation 'com.jakewharton:butterknife:8.6.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
}
Binary file added app/release/app-release.apk
Binary file not shown.
1 change: 1 addition & 0 deletions app/release/output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
Binary file added app/src/main/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions app/src/main/java/com/king/mvpframe/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import android.app.Application;

import com.king.frame.api.ApiManager;
import com.orhanobut.logger.LogLevel;
import com.orhanobut.logger.Logger;

/**
* @author Jenly <a href="mailto:jenly1314@gmail.com">Jenly</a>
*/

public class App extends Application {

private static final String TAG = "Jenly";

@Override
public void onCreate() {
super.onCreate();
Expand All @@ -22,11 +18,5 @@ public void onCreate() {

private void init(){
ApiManager.init(Constants.BASE_URL);

if(BuildConfig.DEBUG){
Logger.init(TAG);
}else{
Logger.init(TAG).logLevel( LogLevel.NONE );
}
}
}
3 changes: 0 additions & 3 deletions app/src/main/java/com/king/mvpframe/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@
import android.text.InputType;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;

import com.king.frame.mvp.base.BaseActivity;
import com.king.frame.mvp.base.QuickActivity;
import com.king.mvpframe.bean.IPAddress;
import com.king.mvpframe.mvp.presenter.IPAddrPresenter;
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/java/com/king/mvpframe/api/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
import com.king.frame.api.ApiObserver;
import com.king.frame.api.SimpleCallback;
import com.king.mvpframe.bean.IPAddress;
import com.king.mvpframe.mvp.view.IIPAddrView;

import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
* @author Jenly <a href="mailto:jenly1314@gmail.com">Jenly</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package com.king.mvpframe.mvp.presenter;

import android.support.annotation.NonNull;

import com.king.frame.api.SimpleCallback;
import com.king.frame.mvp.base.BasePresenter;
import com.king.mvpframe.api.Api;
import com.king.mvpframe.bean.IPAddress;
import com.king.mvpframe.mvp.view.IIPAddrView;
import com.orhanobut.logger.Logger;

import timber.log.Timber;

/**
* @author Jenly <a href="mailto:jenly1314@gmail.com">Jenly</a>
Expand All @@ -14,16 +17,20 @@

public class IPAddrPresenter extends BasePresenter<IIPAddrView>{

public void getIp(final String ip){


public void getIp(String ip){
Logger.d("query:" + ip);
getView().showProgress();
Api.getApiAddr(ip, new SimpleCallback<IPAddress>(getView()) {
ifViewAttached(new ViewAction<IIPAddrView>() {
@Override
public void onNext(IPAddress ipAddress) {
getView().onGetIPAddr(ipAddress);
public void run(final @NonNull IIPAddrView view) {
view.showProgress();
Api.getApiAddr(ip, new SimpleCallback<IPAddress>(view) {
@Override
public void onNext(IPAddress ipAddress) {
view.onGetIPAddr(ipAddress);
}
});
}
});

}
}
34 changes: 34 additions & 0 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>
Loading

0 comments on commit e0a6d59

Please sign in to comment.