Skip to content

Commit

Permalink
改名完成
Browse files Browse the repository at this point in the history
  • Loading branch information
jeasonlzy committed Sep 28, 2016
1 parent d411594 commit ece3a87
Show file tree
Hide file tree
Showing 144 changed files with 656 additions and 656 deletions.
96 changes: 48 additions & 48 deletions README.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ android {
compileSdkVersion buildSdkVersion
buildToolsVersion buildToolVersion
defaultConfig {
applicationId "com.lzy.okhttpdemo"
applicationId "com.lzy.demo"
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 24
versionCode 23
versionName "1.8.1"
}
signingConfigs {
appkey {
keyAlias 'okhttpgo'
keyAlias 'OkGo'
keyPassword '111111'
storeFile file('../appkey.jks')
storePassword '111111'
Expand Down Expand Up @@ -51,7 +51,7 @@ android {
task makeApk {
doLast {
def versionName = android.defaultConfig.versionName
def appName = "okhttpgo_v${versionName}.apk"
def appName = "okgo_v${versionName}.apk"
copy {
from "./build/outputs/apk/app-miui-debug.apk"
into "../"
Expand All @@ -76,9 +76,9 @@ dependencies {
compile 'com.lzy.widget:ninegridview:0.2.0'
compile 'com.lzy.widget:imagepicker:0.3.2'
compile 'com.lzy.widget:view-core:0.2.1'
// compile 'com.lzy.net:okhttputils:+'
// compile 'com.lzy.net:okhttpserver:+'
compile project(':okhttpgo')
compile project(':okhttpserver')
// compile 'com.lzy.net:okgo:+'
// compile 'com.lzy.net:okserver:+'
compile project(':okgo')
compile project(':okserver')
compile project(':okrx')
}
6 changes: 3 additions & 3 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
-dontwarn com.lzy.okhttputils.**
-keep class com.lzy.okhttputils.**{*;}

#okhttpserver
-dontwarn com.lzy.okhttpserver.**
-keep class com.lzy.okhttpserver.**{*;}
#okserver
-dontwarn okserver.**
-keep class okserver.**{*;}

#okhttp
-dontwarn okhttp3.**
Expand Down
44 changes: 22 additions & 22 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lzy.okhttpdemo"
<manifest package="com.lzy.demo"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET"/>
Expand All @@ -8,14 +8,14 @@
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>

<application
android:name=".GApp"
android:name="com.lzy.demo.GApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:name="com.lzy.demo.MainActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
Expand All @@ -24,37 +24,37 @@
</intent-filter>
</activity>

<activity android:name=".okhttpgo.MethodActivity"/>
<activity android:name=".okhttpgo.JsonRequestActivity"/>
<activity android:name=".okhttpgo.BitmapRequestActivity"/>
<activity android:name=".okhttpgo.PostTextActivity"/>
<activity android:name=".okhttpgo.FormUploadActivity"/>
<activity android:name=".okhttpgo.FileDownloadActivity"/>
<activity android:name=".okhttpgo.CacheActivity"/>
<activity android:name=".okhttpgo.HttpsActivity"/>
<activity android:name=".okhttpgo.SyncActivity"/>
<activity android:name=".okhttpgo.RedirectActivity"/>
<activity android:name=".okhttpgo.TestActivity"/>
<activity
android:name=".cache.CacheDemoActivity"
<activity android:name="com.lzy.demo.okgo.MethodActivity"/>
<activity android:name="com.lzy.demo.okgo.JsonRequestActivity"/>
<activity android:name="com.lzy.demo.okgo.BitmapRequestActivity"/>
<activity android:name="com.lzy.demo.okgo.PostTextActivity"/>
<activity android:name="com.lzy.demo.okgo.FormUploadActivity"/>
<activity android:name="com.lzy.demo.okgo.FileDownloadActivity"/>
<activity android:name="com.lzy.demo.okgo.CacheActivity"/>
<activity android:name="com.lzy.demo.okgo.HttpsActivity"/>
<activity android:name="com.lzy.demo.okgo.SyncActivity"/>
<activity android:name="com.lzy.demo.okgo.RedirectActivity"/>
<activity android:name="com.lzy.demo.okgo.TestActivity"/>
<activity
android:name="com.lzy.demo.cache.CacheDemoActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".WebActivity"
android:name="com.lzy.demo.WebActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".okhttpgo.OkHttpActivity"
android:name="com.lzy.demo.okgo.OkHttpActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".okhttpserver.DownloadManagerActivity"
android:name="com.lzy.demo.okserver.DownloadManagerActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".okhttpserver.DesActivity"
android:name="com.lzy.demo.okserver.DesActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".okhttpserver.DownloadActivity"
android:name="com.lzy.demo.okserver.DownloadActivity"
android:theme="@style/AppTheme.NoActionBar"/>
<activity
android:name=".okhttpserver.UploadActivity"
android:name="com.lzy.demo.okserver.UploadActivity"
android:theme="@style/AppTheme.NoActionBar"/>
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.lzy.okhttpdemo;
package com.lzy.demo;

import android.app.Application;

import com.lzy.okhttpgo.OkHttpGo;
import com.lzy.okhttpgo.cache.CacheEntity;
import com.lzy.okhttpgo.cache.CacheMode;
import com.lzy.okhttpgo.cookie.store.PersistentCookieStore;
import com.lzy.okhttpgo.model.HttpHeaders;
import com.lzy.okhttpgo.model.HttpParams;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.cache.CacheEntity;
import com.lzy.okgo.cache.CacheMode;
import com.lzy.okgo.cookie.store.PersistentCookieStore;
import com.lzy.okgo.model.HttpHeaders;
import com.lzy.okgo.model.HttpParams;

/**
* ================================================
Expand All @@ -34,21 +34,21 @@ public void onCreate() {
//-----------------------------------------------------------------------------------//

//必须调用初始化
OkHttpGo.init(this);
OkGo.init(this);

//以下设置的所有参数是全局参数,同样的参数可以在请求的时候再设置一遍,那么对于该请求来讲,请求中的参数会覆盖全局参数
//好处是全局参数统一,特定请求可以特别定制参数
try {
//以下都不是必须的,根据需要自行选择,一般来说只需要 debug,缓存相关,cookie相关的 就可以了
OkHttpGo.getInstance()
OkGo.getInstance()

//打开该调试开关,控制台会使用 红色error 级别打印log,并不是错误,是为了显眼,不需要就不要加入该行
.debug("OkHttpGo")
.debug("OkGo")

//如果使用默认的 60秒,以下三行也不需要传
.setConnectTimeout(OkHttpGo.DEFAULT_MILLISECONDS) //全局的连接超时时间
.setReadTimeOut(OkHttpGo.DEFAULT_MILLISECONDS) //全局的读取超时时间
.setWriteTimeOut(OkHttpGo.DEFAULT_MILLISECONDS) //全局的写入超时时间
.setConnectTimeout(OkGo.DEFAULT_MILLISECONDS) //全局的连接超时时间
.setReadTimeOut(OkGo.DEFAULT_MILLISECONDS) //全局的读取超时时间
.setWriteTimeOut(OkGo.DEFAULT_MILLISECONDS) //全局的写入超时时间

//可以全局统一设置缓存模式,默认是不使用缓存,可以不传,具体其他模式看 github 介绍 https://github.com/jeasonlzy0216/
.setCacheMode(CacheMode.NO_CACHE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo;
package com.lzy.demo;

import android.content.Context;
import android.content.Intent;
Expand All @@ -11,16 +11,16 @@
import android.view.ViewGroup;
import android.widget.TextView;

import com.lzy.okhttpdemo.base.BaseActivity;
import com.lzy.okhttpdemo.base.BaseRecyclerAdapter;
import com.lzy.okhttpdemo.base.DividerItemDecoration;
import com.lzy.okhttpdemo.cache.CacheDemoActivity;
import com.lzy.okhttpdemo.okhttpserver.DownloadActivity;
import com.lzy.okhttpdemo.okhttpserver.UploadActivity;
import com.lzy.okhttpdemo.okhttpgo.FileDownloadActivity;
import com.lzy.okhttpdemo.okhttpgo.FormUploadActivity;
import com.lzy.okhttpdemo.okhttpgo.JsonRequestActivity;
import com.lzy.okhttpdemo.okhttpgo.OkHttpActivity;
import com.lzy.demo.base.BaseActivity;
import com.lzy.demo.base.BaseRecyclerAdapter;
import com.lzy.demo.base.DividerItemDecoration;
import com.lzy.demo.cache.CacheDemoActivity;
import com.lzy.demo.okserver.DownloadActivity;
import com.lzy.demo.okserver.UploadActivity;
import com.lzy.demo.okgo.FileDownloadActivity;
import com.lzy.demo.okgo.FormUploadActivity;
import com.lzy.demo.okgo.JsonRequestActivity;
import com.lzy.demo.okgo.OkHttpActivity;

import java.util.ArrayList;

Expand Down Expand Up @@ -55,12 +55,12 @@ private void initData() {
items = new ArrayList<>();
OkHttpModel model1 = new OkHttpModel();
model1.title = "";
model1.des = "下面是OkHttpGo包的使用方法";
model1.des = "下面是OkGo包的使用方法";
model1.type = 1;
items.add(model1);

OkHttpModel model2 = new OkHttpModel();
model2.title = "基本功能(OkHttpGo)";
model2.title = "基本功能(OkGo)";
model2.des = "1.GET,HEAD,OPTIONS,POST,PUT,DELETE 请求方法演示\n" +
"2.请求服务器返回bitmap对象\n" +
"3.支持https请求\n" +
Expand Down Expand Up @@ -96,30 +96,30 @@ private void initData() {

OkHttpModel model6 = new OkHttpModel();
model6.title = "强大的缓存示例 -- 先联网获取数据,然后断开网络再进试试";
model6.des = "1.OkHttpGo的强大的缓存功能,让你代码无需关心数据来源,专注于业务逻辑的实现\n" +
model6.des = "1.OkGo的强大的缓存功能,让你代码无需关心数据来源,专注于业务逻辑的实现\n" +
"2.共有五种缓存模式满足你各种使用场景\n" +
"3.支持自定义缓存过期时间";
model6.type = 0;
items.add(model6);

OkHttpModel model7 = new OkHttpModel();
model7.title = "";
model7.des = "下面是OkHttpServer包的使用方法";
model7.des = "下面是OkServer包的使用方法";
model7.type = 1;
items.add(model7);

OkHttpModel model8 = new OkHttpModel();
model8.title = "下载管理(OkHttpServer)";
model8.des = "1.这个属于OkHttpServer依赖中的功能,并不属于OkHttpGo\n" +
"2.这个包维护较少,一般情况下,不做特殊的下载管理功能,OkHttpGo完全可以胜任\n" +
"3.相比OkHttpGo主要是多了断点下载和下载状态的管理";
model8.title = "下载管理(OkServer)";
model8.des = "1.这个属于OkServer依赖中的功能,并不属于OkGo\n" +
"2.这个包维护较少,一般情况下,不做特殊的下载管理功能,OkGo完全可以胜任\n" +
"3.相比OkGo主要是多了断点下载和下载状态的管理";
model8.type = 0;
items.add(model8);

OkHttpModel model9 = new OkHttpModel();
model9.title = "上传管理(OkHttpServer)";
model9.des = "1.这个同上,也属于OkHttpServer依赖中的功能\n" +
"2.同样该包的功能OkHttpGo完全可以胜任\n" +
model9.title = "上传管理(OkServer)";
model9.des = "1.这个同上,也属于OkServer依赖中的功能\n" +
"2.同样该包的功能OkGo完全可以胜任\n" +
"3.上传只是简单上传管理,不支持断点上传或者分片上传";
model9.type = 0;
items.add(model9);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo;
package com.lzy.demo;

import android.content.Context;
import android.content.Intent;
Expand All @@ -10,7 +10,7 @@
import android.webkit.WebViewClient;
import android.widget.ProgressBar;

import com.lzy.okhttpdemo.base.BaseActivity;
import com.lzy.demo.base.BaseActivity;

import butterknife.Bind;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.base;
package com.lzy.demo.base;

import android.graphics.Color;
import android.os.Build;
Expand All @@ -14,7 +14,7 @@
import android.view.WindowManager;

import com.lzy.imagepicker.view.SystemBarTintManager;
import com.lzy.okhttpdemo.R;
import com.lzy.demo.R;

import butterknife.ButterKnife;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.base;
package com.lzy.demo.base;

import android.graphics.Bitmap;
import android.os.Bundle;
Expand All @@ -9,7 +9,7 @@
import android.widget.FrameLayout;
import android.widget.TextView;

import com.lzy.okhttpdemo.R;
import com.lzy.demo.R;

import java.io.File;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.base;
package com.lzy.demo.base;

import android.os.Bundle;
import android.support.v4.app.Fragment;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.base;
package com.lzy.demo.base;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.base;
package com.lzy.demo.base;

import android.content.Context;
import android.content.res.TypedArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.cache;
package com.lzy.demo.cache;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
Expand All @@ -10,10 +10,10 @@
import android.view.View;

import com.lzy.ninegrid.NineGridView;
import com.lzy.okhttpdemo.R;
import com.lzy.okhttpdemo.WebActivity;
import com.lzy.okhttpdemo.base.BaseActivity;
import com.lzy.okhttpdemo.utils.GlideImageLoader;
import com.lzy.demo.R;
import com.lzy.demo.WebActivity;
import com.lzy.demo.base.BaseActivity;
import com.lzy.demo.utils.GlideImageLoader;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.lzy.okhttpdemo.cache;
package com.lzy.demo.cache;

import android.view.View;

Expand All @@ -7,9 +7,9 @@
import com.lzy.ninegrid.ImageInfo;
import com.lzy.ninegrid.NineGridView;
import com.lzy.ninegrid.preview.NineGridViewClickAdapter;
import com.lzy.okhttpdemo.R;
import com.lzy.okhttpdemo.WebActivity;
import com.lzy.okhttpdemo.model.NewsModel;
import com.lzy.demo.R;
import com.lzy.demo.WebActivity;
import com.lzy.demo.model.NewsModel;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.lzy.okhttpdemo.cache;
package com.lzy.demo.cache;

import android.text.TextUtils;

import com.google.gson.Gson;
import com.lzy.okhttpdemo.utils.Urls;
import com.lzy.okhttpgo.callback.AbsCallback;
import com.lzy.okhttpgo.request.BaseRequest;
import com.lzy.demo.utils.Urls;
import com.lzy.okgo.callback.AbsCallback;
import com.lzy.okgo.request.BaseRequest;

import org.json.JSONObject;

Expand Down
Loading

0 comments on commit ece3a87

Please sign in to comment.