Forum Xamarin.Android

Fragment Support Library

Hi, I have been working to understand how to import support.V4 library to my project so that my fragment activity can work. I edited my references and checked Mono.Android.Support.V4 and Re-built my project but it keeps showing errors on my FragmentActivity (The type or namespace name `FragmentActivity' could not be found.
Are you missing a using directive or an assembly reference?).

Posts

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai
    edited July 2013

    FragmentActivity is in the Android.Support.V4.App namespace, not in Android.App. You can adjust your using statements accordingly or make sure that you use the full namespace when you reference the class.

    See the section on Providing Backwards Compatibility.

  • CheesebaronCheesebaron DKInsider, University mod

    I've made a small video displaying how I do it in VS2012: The approach should be very similar in Xamarin Studio.

    Make sure when using Fragments that you consistently use Fragments from the Support.V4. So if you include the library in a project targeting, say, API level 14, which has Fragments inside, but you still want to have backwards compatibility, make sure to use the Fragments from Support.V4.

  • cheko88cheko88 USMember

    Thank you, really helpfull your comments, i was writting wrong the namespace Android.Support.V4.App , now it works fine.

Sign In or Register to comment.