public static LoginFragment NewInstance() { var frag = new LoginFragment { Arguments = new Bundle() }; return(frag); }
/// <summary> /// /// </summary> /// <param name="savedInstanceState"></param> protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_main); LoginFragment lFrag = LoginFragment.NewInstance(); lFrag.OnLoginCorrect += OnLogin; _currentLoginFragment = lFrag; // Attach event handler to BottomNavigationView BottomNavigationView navigation = FindViewById <BottomNavigationView>(Resource.Id.navigation); navigation.SetOnNavigationItemSelectedListener(this); // Create your fragment here }