Skip to content

Instantly share code, notes, and snippets.

@usausa
Created April 11, 2019 07:15
Show Gist options
  • Select an option

  • Save usausa/b2a1f0f41fcca44725455d8da435b72a to your computer and use it in GitHub Desktop.

Select an option

Save usausa/b2a1f0f41fcca44725455d8da435b72a to your computer and use it in GitHub Desktop.
using Android.App;
using Android.Content.PM;
using Android.OS;
using Android.Support.V7.App;
using Android.Views;
using Xamarin.Forms.Platform.Android;
[Activity(
Theme = "@style/MainTheme",
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
ScreenOrientation = ScreenOrientation.Portrait)]
public class SecondActivity : AppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
var page = new SecondPage().CreateSupportFragment(this);
SupportFragmentManager
.BeginTransaction()
.AddToBackStack(null)
.Add(Android.Resource.Id.Content, page)
.Commit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment