Here's a post that describes the solution. Main steps are:
- Extend
RoboFragment
. - Return a root
View
fromonCreateView()
. - Use
@InjectView
annotations the same way you do inRoboActivity
.
Question
i have been using RoboGuice dependency injection with a Activity and a Fragment Activity. But i cannot figure out how i can use it using a fragment as we dont call setContentview in the Fargment. Can anyone show me an example of how to use this ?
Kind Regards
Solution
Here's a post that describes the solution. Main steps are:
RoboFragment
.View
from onCreateView()
.@InjectView
annotations the same way you do in RoboActivity
.