Skip to content

Conversation

@kosiara
Copy link

@kosiara kosiara commented Jul 23, 2014

I wanted to be able to use AndroidBinding when binding to an existing view. I use it in Android Annotations where view is constructed automatically with @EActivity(R.layout.activity_init).
Later I reuse my created view @AfterViews protected void afterViews() {} method.

It can be used in @AfterViews method

@AfterViews
protected void afterViews() {
Binder.InflateResult inflateResult = Binder.inflateViewFromExistingView(this, findViewById(R.id.drawer_layout), R.layout.activity_init);
Binder.bindView(this, inflateResult, mViewModel);
}

It can be used in @AfterViews method

@AfterViews
protected void afterViews() {
   Binder.InflateResult inflateResult = Binder.inflateViewFromExistingView(this, findViewById(R.id.drawer_layout), R.layout.activity_init);
   Binder.bindView(this, inflateResult, mViewModel);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants