Using RoboFragment with FragmentManager
Asked Answered
L

1

6

I've been trying to use RoboGuice and fragments with no luck. I have a fragment that extends RoboFragment, and an activity that extends RoboActivity, but it seems that within the RoboActivity, the method getFragmentManager is incompatible with RoboFragment.

It looks like RoboFragment extends android.support.v4.app.Fragmentment but getFragmentManager requires android.app.Fragment.

How is this meant to work?

Linsk answered 17/2, 2013 at 16:14 Comment(0)
L
9

As always I worked our my problem within 10 minutes of posting (sorry)!

I needed my activity to extend RoboFragmentActivity, which then exposed the getSupportFragmentManager method - which returns the android.support.v4.app.FragmentManager which is obviously compatible with android.support.v4.app.Fragment

Matt

Linsk answered 17/2, 2013 at 16:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.