RequestWindowFeature on FragmentActivity

I am having a Fragment Activity which I converted from Activity as below:

public class MainActivity : Android.Support.V4.App.Fragment

I am having CreateView as below:

public override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
var mPrefs = Application.Context.GetSharedPreferences ("SIB.Preferences", FileCreationMode.Private);
if (mPrefs != null) {
if (mPrefs.Contains ("CartID")) {
sCartID = mPrefs.GetString ("CartID", null);
}
}
this.Activity.RequestWindowFeature (WindowFeatures.ActionBar); - This line is giving error

requestWindowFeature muust be called before adding the content.

Please see if someone can help me urgently.

Sign In or Register to comment.