Skip to content
tylertreat edited this page Dec 31, 2012 · 3 revisions

The InjectLayout annotation is used to indicate that the annotated Activity is to be injected with an Android layout. This is essentially a replacement for calling setContentView inside your Activity's onCreate method and is required in order for Activity injection to function properly if setContentView is not called explicitly before injection occurs.

The value attribute corresponds to the ID of the layout to inject.

InjectLayout Example

@InjectLayout(R.layout.my_layout)
public class MyActivity extends InfinitumActivity {

    // ...

}

Clone this wiki locally