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 19, 2016
1 parent
1b89527
commit 501a266
Showing
37 changed files
with
676 additions
and
613 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package com.matto; | ||
|
||
import com.common.EasyApplication; | ||
import com.common.BasicApplication; | ||
import com.common.model.control.LogicProxy; | ||
import com.matto.model.LoginLogic; | ||
import com.matto.model.MainLogic; | ||
|
@@ -9,11 +9,12 @@ | |
* author miekoz on 2016/3/17. | ||
* email [email protected] | ||
*/ | ||
public class App extends EasyApplication { | ||
public class App extends BasicApplication { | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
|
||
LogicProxy.getInstance().init( | ||
LoginLogic.class, MainLogic.class | ||
); | ||
|
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,10 @@ | ||
package com.matto.model.config; | ||
|
||
/** | ||
* author meikoz on 2016/4/19. | ||
* email [email protected] | ||
*/ | ||
public interface ApiConstant { | ||
|
||
String BASE_URL = "http://gank.avosapps.com/api/"; | ||
} |
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
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/matto/ui/activity/AndroidSwipActivity.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,21 @@ | ||
package com.matto.ui.activity; | ||
|
||
import android.os.Bundle; | ||
|
||
import com.common.view.base.SwipeBackActivity; | ||
import com.common.view.base.SwipeBackLayout; | ||
import com.matto.R; | ||
|
||
/** | ||
* author meikoz on 2016/4/19. | ||
* email [email protected] | ||
*/ | ||
public class AndroidSwipActivity extends SwipeBackActivity { | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_common); | ||
setDragEdge(SwipeBackLayout.DragEdge.LEFT); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,38 @@ | ||
package com.matto.ui.fragment; | ||
|
||
import android.content.Intent; | ||
import android.view.View; | ||
import android.widget.ImageView; | ||
|
||
import com.common.view.base.BaseFragment; | ||
import com.common.view.widget.OnClickEvent; | ||
import com.matto.R; | ||
import com.matto.ui.activity.AndroidSwipActivity; | ||
import com.matto.ui.activity.LoginActivity; | ||
|
||
import butterknife.Bind; | ||
|
||
/** | ||
* author meikoz on 2016/4/19. | ||
* email [email protected] | ||
*/ | ||
public class HomeFragment extends BaseFragment { | ||
|
||
@Bind(R.id.splash_view) | ||
ImageView splashView; | ||
|
||
@Override | ||
protected int getLayoutResource() { | ||
return R.layout.activity_spalsh; | ||
} | ||
|
||
@Override | ||
protected void onInitData() { | ||
|
||
splashView.setOnClickListener(new OnClickEvent() { | ||
@Override | ||
public void singleClick(View v) { | ||
startActivity(new Intent(getActivity(), AndroidSwipActivity.class)); | ||
} | ||
}); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.common.view.base; | ||
package com.matto.ui.widget; | ||
|
||
import android.app.Activity; | ||
import android.content.Context; | ||
|
@@ -11,14 +11,14 @@ | |
import android.widget.RelativeLayout; | ||
import android.widget.TextView; | ||
|
||
import com.common.R; | ||
import com.common.utils.DisplayUtil; | ||
import com.matto.R; | ||
|
||
/** | ||
* author miekoz on 2016/3/15. | ||
* email [email protected] | ||
*/ | ||
public class EasyToolBar extends RelativeLayout implements View.OnClickListener { | ||
public class TitleBar extends RelativeLayout implements View.OnClickListener { | ||
|
||
LinearLayout mlvTitleRight; | ||
TextView mTvTitle; | ||
|
@@ -27,12 +27,12 @@ public class EasyToolBar extends RelativeLayout implements View.OnClickListener | |
private OnClickTitleBarBackCallback mCallBack; | ||
private TextView mTvRightText; | ||
|
||
public EasyToolBar(Context context) { | ||
public TitleBar(Context context) { | ||
super(context); | ||
onInit(); | ||
} | ||
|
||
public EasyToolBar(Context context, AttributeSet attrs) { | ||
public TitleBar(Context context, AttributeSet attrs) { | ||
super(context, attrs); | ||
onInit(); | ||
TypedArray array = getContext().obtainStyledAttributes(attrs, R.styleable.titlebarview); | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:background="@android:color/white" | ||
android:orientation="vertical"> | ||
|
||
<include layout="@layout/view_tool_bar" /> | ||
|
||
<TextView | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="hello_world" /> | ||
|
||
</LinearLayout> | ||
|
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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
basic/src/main/res/layout/view_tool_bar.xml → app/src/main/res/layout/view_tool_bar.xml
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,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<com.common.view.base.EasyToolBar | ||
android:id="@+id/toolbar" | ||
<com.matto.ui.widget.TitleBar | ||
android:id="@+id/title_bar" | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp"/> |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.common; | ||
|
||
import android.app.Application; | ||
import android.content.Context; | ||
|
||
import com.common.model.basic.LocationTip; | ||
|
||
/** | ||
* author miekoz on 2016/3/17. | ||
* email [email protected] | ||
*/ | ||
public class BasicApplication extends Application { | ||
|
||
private static BasicApplication ourInstance = new BasicApplication(); | ||
private static Context mContext; | ||
|
||
public static BasicApplication getInstance() { | ||
return ourInstance; | ||
} | ||
|
||
public static Context getContext() { | ||
return mContext; | ||
} | ||
|
||
@Override | ||
public void onCreate() { | ||
super.onCreate(); | ||
ourInstance = this; | ||
mContext = getApplicationContext(); | ||
|
||
new LocationTip(this).doStartLocation(); | ||
} | ||
|
||
|
||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.