Skip to content

Commit

Permalink
update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
zjlong committed May 31, 2016
1 parent 208bb04 commit 2be4476
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected int getLayoutResource() {
@Override
protected void onInitView() {
titlebar.setTitle("登录页面");
mLoginLogic = LogicProxy.getInstance().bind(LoginLogic.class, this);
mLoginLogic = getLogicImpl(LoginLogic.class, this);
}

@Override
Expand Down
7 changes: 7 additions & 0 deletions core/src/main/java/com/android/core/ui/BaseActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import android.os.Bundle;
import android.view.Window;

import com.android.core.model.control.LogicProxy;

import butterknife.ButterKnife;

/**
Expand Down Expand Up @@ -42,6 +44,11 @@ public void startActivity(Intent intent) {
// 打开Activity动画
}

//获得该页面的实例
public <T> T getLogicImpl(Class cls, Object o) {
return LogicProxy.getInstance().bind(cls, o);
}

@Override
public void finish() {
super.finish();
Expand Down

0 comments on commit 2be4476

Please sign in to comment.