Created
March 6, 2015 23:02
-
-
Save lukaspili/2c9fac50d409280721a5 to your computer and use it in GitHub Desktop.
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
public class SimpleView extends LinearLayout { | |
@Inject | |
SimpleScreen.Presenter presenter; | |
public SimpleView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
DaggerService.<SimpleScreen.Component>getDaggerComponent(context) | |
.inject(this); | |
} | |
@Override | |
protected void onAttachedToWindow() { | |
super.onAttachedToWindow(); | |
presenter.takeView(this); | |
} | |
@Override | |
protected void onDetachedFromWindow() { | |
presenter.dropView(this); | |
super.onDetachedFromWindow(); | |
} | |
@Override | |
protected void onFinishInflate() { | |
super.onFinishInflate(); | |
ButterKnife.inject(this); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment