0

I'm trying to figure out what could be wrong with my view injection. It works for fragments in my application, but I can't seem to get it working for activity. Here is my code:

@ContentView(R.layout.schedule)
public class ScheduleActivity extends RoboFragmentActivity{

   @InjectView(R.id.train_list_holder) ListView mViewTrainListContainer;

   @Override
   protected void onCreate(Bundle arg0) {
       super.onCreate(arg0);
       CL.v(String.valueOf(mViewTrainListContainer));
   }
}

Value of mViewTrainListContainer is always null.

somerandomusername
  • 1,993
  • 4
  • 23
  • 55

1 Answers1

0

Type of View was set wrong. It was LinearLayout, not ListView.

somerandomusername
  • 1,993
  • 4
  • 23
  • 55