-
-
Save espritm/ca09e73f1c334373fff3f546fd5a47e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool OnCreateOptionsMenu(Android.Views.IMenu menu) | |
{ | |
MenuInflater.Inflate(Resource.Menu.top_menus, menu); | |
return base.OnCreateOptionsMenu(menu); | |
} | |
public override bool OnOptionsItemSelected(IMenuItem item) | |
{ | |
switch (item.ItemId) | |
{ | |
case Resource.Id.share: | |
Intent sendShareIntent = new Intent(Intent.ActionSend) | |
.SetType("text/plain") | |
.PutExtra(Intent.ExtraText, "www.maximeesprit.com"); | |
StartActivity(sendShareIntent); | |
break; | |
case Resource.Id.moreoption: | |
if (SupportActionBar.Title == Resources.GetString(Resource.String.titleRenamed)) | |
SupportActionBar.Title = Resources.GetString(Resource.String.titleBase); | |
else | |
SupportActionBar.Title = Resources.GetString(Resource.String.titleRenamed); | |
break; | |
} | |
return base.OnOptionsItemSelected(item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment