Android RoboGuice @InjectView annotation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

You can inject any view using the @InjectView annotation:

You'll need to:

  • Inherit from RoboActivity
  • Set your content view
  • Annotate your views with @InjectView

Example

@InjectView(R.id.textView1) TextView textView1;

@InjectView(R.id.textView2) TextView textView2;

@InjectView(R.id.imageView1) ImageView imageView1;


Got any Android Question?