Skip to content

Instantly share code, notes, and snippets.

@ljanzik
Created September 25, 2012 09:34
Show Gist options
  • Save ljanzik/3780881 to your computer and use it in GitHub Desktop.
Save ljanzik/3780881 to your computer and use it in GitHub Desktop.
Demonstration of Roboject
@InjectLayout(R.layout.example)
public class ExampleActivity extends RobojectActivity {
@InjectView(R.id.text_view)
private TextView textView;
@InjectView(R.id.edit_text)
private EditText editText;
}
@InjectLayout("R.layout.example")
public class ExampleActivity extends RobojectActivity {
@InjectView("R.id.text_view")
private TextView textView;
@InjectView("R.id.edit_text")
private EditText editText;
}
public class ExampleActivity extends Activity {
private TextView textView;
private EditText editText;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
textView = (TextView)findViewById(R.id.text_view)
editText = (EditText)findViewById(R.id.edit_text)
setContentView(R.layout.example);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment