forked from racofix/architecture-for-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
zjlong
committed
Apr 26, 2016
1 parent
3d4a670
commit 88049a2
Showing
39 changed files
with
114 additions
and
1,051 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.
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 |
---|---|---|
|
@@ -29,4 +29,5 @@ dependencies { | |
|
||
compile 'com.android.support:appcompat-v7:23.2.0' | ||
compile 'com.android.support:design:23.2.0' | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() { | ||
|
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,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) { | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -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; | ||
|
@@ -12,7 +12,7 @@ | |
* author miekoz on 2016/3/17. | ||
* email [email protected] | ||
*/ | ||
public interface MainService { | ||
public interface BaseHttpService { | ||
|
||
/** | ||
* 使用缓存机制 | ||
|
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,8 @@ | ||
package com.matto.model.http; | ||
|
||
/** | ||
* author meikoz on 2016/4/26. | ||
* email [email protected] | ||
*/ | ||
public interface BaseUserService { | ||
} |
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,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
25
app/src/main/java/com/matto/model/http/ServiceFactory.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../main/java/com/matto/pojo/CommonRepo.java → ...java/com/matto/model/pojo/CommonRepo.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.matto.pojo; | ||
package com.matto.model.pojo; | ||
|
||
/** | ||
* author miekoz on 2016/3/21. | ||
|
2 changes: 1 addition & 1 deletion
2
app/src/main/java/com/matto/pojo/Gank.java → .../main/java/com/matto/model/pojo/Gank.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.matto.pojo; | ||
package com.matto.model.pojo; | ||
|
||
import java.util.List; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...main/java/com/matto/pojo/GankDetails.java → ...ava/com/matto/model/pojo/GankDetails.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.matto.pojo; | ||
package com.matto.model.pojo; | ||
|
||
/** | ||
* author miekoz on 2016/3/17. | ||
|
3 changes: 2 additions & 1 deletion
3
...main/java/com/matto/model/LoginLogic.java → .../java/com/matto/presenter/LoginLogic.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
3 changes: 2 additions & 1 deletion
3
.../main/java/com/matto/model/MainLogic.java → ...n/java/com/matto/presenter/MainLogic.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
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
3 changes: 2 additions & 1 deletion
3
...n/java/com/matto/model/MainLogicImpl.java → ...m/matto/presenter/impl/MainLogicImpl.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
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
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
This file was deleted.
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
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 |
---|---|---|
|
@@ -27,5 +27,4 @@ public void onCreate() { | |
mContext = getApplicationContext(); | ||
} | ||
|
||
|
||
} |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,5 +86,4 @@ public void loadCircleLocalImage(Context context, String path, ImageView imageVi | |
.into(imageView); | ||
} | ||
|
||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,5 @@ | |
* email [email protected] | ||
*/ | ||
public interface MvpLogic<T> { | ||
|
||
void attachView(T mvpView); | ||
} |
Oops, something went wrong.