How to insert a dialog using Roboguice?

It seems that roboguice can only inject views from the contentView defined in onCreate(...) activity. Outside of onCreate() , for example, if I have my own custom dialog that also has a content view (for example, dialog.setContentView(R.layout.dialog_layout); ), how can I embed views from this dialog_layout into my activity? (I got null when I directly insert dialog views into the action)

+4
source share
2 answers

Roboguice does not currently support injection views for things like Dialogs or Adapters. The code for handling it is pretty simple and corrections for the roboguice project are certainly welcome.

Here is a link to add some support for adapters, something with a dialog should be pretty similar.

https://groups.google.com/d/topic/roboguice/dJqcGJTcTzs/discussion

+2
source

You can use RoboDialogFragment in RoboGuice 2.0

+2
source

All Articles