Skip to content

Commit

Permalink
整理没用资源
Browse files Browse the repository at this point in the history
  • Loading branch information
zjlong committed Apr 26, 2016
1 parent 3d4a670 commit 88049a2
Show file tree
Hide file tree
Showing 39 changed files with 114 additions and 1,051 deletions.
2 changes: 1 addition & 1 deletion .idea/encodings.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/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ dependencies {

compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'

}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".App"
android:name=".AndroidApp"
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import com.common.BasicApplication;
import com.common.model.control.LogicProxy;
import com.matto.model.LoginLogic;
import com.matto.model.MainLogic;
import com.matto.presenter.LoginLogic;
import com.matto.presenter.MainLogic;

/**
* author miekoz on 2016/3/17.
* email [email protected]
*/
public class App extends BasicApplication {
public class AndroidApp extends BasicApplication {

@Override
public void onCreate() {
Expand Down
25 changes: 25 additions & 0 deletions app/src/main/java/com/matto/adapter/CommonAdapter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.matto.adapter;

import android.content.Context;

import com.joanzapata.android.BaseAdapterHelper;
import com.joanzapata.android.QuickAdapter;
import com.matto.model.pojo.Gank;

import java.util.List;

/**
* author meikoz on 2016/4/26.
* email [email protected]
*/
public class CommonAdapter extends QuickAdapter<Gank> {

public CommonAdapter(Context context, int layoutResId, List<Gank> data) {
super(context, layoutResId, data);
}

@Override
protected void convert(BaseAdapterHelper helper, Gank item) {

}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.matto.model.http;


import com.matto.pojo.Gank;
import com.matto.model.pojo.Gank;

import retrofit2.Call;
import retrofit2.http.GET;
Expand All @@ -12,7 +12,7 @@
* author miekoz on 2016/3/17.
* email [email protected]
*/
public interface MainService {
public interface BaseHttpService {

/**
* 使用缓存机制
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/com/matto/model/http/BaseUserService.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.matto.model.http;

/**
* author meikoz on 2016/4/26.
* email [email protected]
*/
public interface BaseUserService {
}
39 changes: 39 additions & 0 deletions app/src/main/java/com/matto/model/http/Factory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.matto.model.http;

import com.common.model.http.HttpClient;
import com.matto.model.config.ApiConstant;

import java.util.HashMap;
import java.util.Map;


/**
* author miekoz on 2016/3/21.
* email [email protected]
*/
public class Factory {

public static BaseUserService provideUserService() {
return provideService(BaseUserService.class);
}

public static BaseHttpService provideHttpService() {
return provideService(BaseHttpService.class);
}

private static Map<Class, Object> m_service = new HashMap();

public static <T> T provideService(Class cls) {
Object serv = m_service.get(cls);
if (serv == null) {
synchronized (cls) {
serv = m_service.get(cls);
if (serv == null) {
serv = HttpClient.getIns(ApiConstant.BASE_URL).createService(cls);
m_service.put(cls, serv);
}
}
}
return (T) serv;
}
}
25 changes: 0 additions & 25 deletions app/src/main/java/com/matto/model/http/ServiceFactory.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.matto.pojo;
package com.matto.model.pojo;

/**
* author miekoz on 2016/3/21.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.matto.pojo;
package com.matto.model.pojo;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.matto.pojo;
package com.matto.model.pojo;

/**
* author miekoz on 2016/3/17.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.matto.model;
package com.matto.presenter;

import com.common.model.control.MvpLogic;
import com.common.model.annotation.Implement;
import com.matto.presenter.impl.LoginLogicImpl;
import com.matto.ui.view.LoginView;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.matto.model;
package com.matto.presenter;

import com.common.model.annotation.Implement;
import com.common.model.control.MvpLogic;
import com.matto.presenter.impl.MainLogicImpl;
import com.matto.ui.view.MainView;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.matto.model;
package com.matto.presenter.impl;

import android.util.Log;

import com.matto.model.http.MainService;
import com.matto.model.http.ServiceFactory;
import com.matto.pojo.Gank;
import com.matto.model.http.BaseHttpService;
import com.matto.model.http.Factory;
import com.matto.model.pojo.Gank;
import com.matto.presenter.LoginLogic;
import com.matto.ui.view.LoginView;

import retrofit2.Call;
Expand All @@ -17,7 +18,7 @@
*/
public class LoginLogicImpl implements LoginLogic {

MainService mainService;
BaseHttpService mainService;
LoginView mView;

@Override
Expand All @@ -43,7 +44,7 @@ public void onFailure(Call<Gank> call, Throwable t) {
@Override
public void attachView(LoginView mvpView) {
this.mView = mvpView;
this.mainService = ServiceFactory.getMainIns();
this.mainService = Factory.getMainIns();
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.matto.model;
package com.matto.presenter.impl;

import com.matto.R;
import com.matto.presenter.MainLogic;
import com.matto.ui.view.MainView;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import android.os.Bundle;

import com.common.view.base.SwipeBackActivity;
import com.common.view.base.SwipeBackLayout;
import com.common.view.widget.SwipeBackLayout;
import com.matto.R;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/matto/ui/activity/LoginActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.matto.ui.widget.TitleBar;
import com.matto.R;
import com.common.model.control.LogicProxy;
import com.matto.model.LoginLogic;
import com.matto.presenter.LoginLogic;
import com.matto.ui.view.LoginView;

import butterknife.Bind;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/matto/ui/activity/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.common.model.control.LogicProxy;
import com.common.view.base.BaseActivity;
import com.matto.R;
import com.matto.model.MainLogic;
import com.matto.presenter.MainLogic;
import com.matto.ui.fragment.DiscoveryFragment;
import com.matto.ui.fragment.HomeFragment;
import com.matto.ui.fragment.ShowMeFragment;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import android.widget.ImageView;

import com.common.view.base.BaseActivity;
import com.common.view.base.StatusBarUtil;
import com.common.utils.StatusBarUtil;
import com.matto.R;
import com.matto.util.AnimationUtil;

Expand Down
27 changes: 0 additions & 27 deletions app/src/main/java/com/matto/ui/adapter/MainAdapter.java

This file was deleted.

7 changes: 6 additions & 1 deletion basic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,20 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'

// butter knife
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.jakewharton:butterknife:7.0.1'

//adapter
compile 'com.joanzapata.android:base-adapter-helper:1.1.11'

//squareup
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta4'
compile 'com.squareup.okhttp3:logging-interceptor:3.1.2'

// Glide
compile 'com.github.bumptech.glide:glide:3.7.0'
compile files('libs/BaiduLBS_Android.jar')
}
1 change: 0 additions & 1 deletion basic/src/main/java/com/common/BasicApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,4 @@ public void onCreate() {
mContext = getApplicationContext();
}


}
27 changes: 0 additions & 27 deletions basic/src/main/java/com/common/model/basic/ToastTip.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,4 @@ public void loadCircleLocalImage(Context context, String path, ImageView imageVi
.into(imageView);
}


}
4 changes: 0 additions & 4 deletions basic/src/main/java/com/common/model/control/LogicProxy.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.common.model.control;

import android.util.Log;

import com.common.model.annotation.Implement;

import java.lang.annotation.Annotation;
Expand All @@ -25,7 +23,6 @@ private LogicProxy() {
}

private Map<Class, Object> m_objects;
//private Object m_proxy;

public void init(Class... clss) {
List<Class> list = new LinkedList<Class>();
Expand All @@ -48,7 +45,6 @@ public void init(Class... clss) {
}

public <T> T getProxy(Class cls) {
//return (T) m_proxy;
return (T) m_objects.get(cls);
}

Expand Down
1 change: 0 additions & 1 deletion basic/src/main/java/com/common/model/control/MvpLogic.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
* email [email protected]
*/
public interface MvpLogic<T> {

void attachView(T mvpView);
}
Loading

0 comments on commit 88049a2

Please sign in to comment.