It seems that roboguice can only inject views from the contentView defined in onCreate(...)
of the activity. Outside onCreate()
, for example, if I have my custom dialog, which has also a content view (e.g. dialog.setContentView(R.layout.dialog_layout);
), how can I inject views from this dialog_layout in my activity? (I got null when I directly inject the dialog views in the activity)
Asked
Active
Viewed 1,713 times
4
2 Answers
2
Currently roboguice does not support injecting views for things like Dialogs or Adapters. The code to handle it is fairly straightforward and patches to the roboguice project are certainly welcome.
Here is a link to adding some support for adapters, doing something with a dialog should be fairly similar.
https://groups.google.com/d/topic/roboguice/dJqcGJTcTzs/discussion

abombss
- 476
- 4
- 7