I'm trying to figure out how to add items to the ActionBar
menu through a Fragment
. My application's MainActivity
is inheriting ActionBarActivity
and I want to be able to change the items on the ActionBar
based on which Fragment
is currently showing.
public class LoginFragment : BaseFragment
{
//...
public override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetHasOptionsMenu(true);
// this.Activity.MenuInflater.Inflate(Resource.Menu.something, ???);
}
}