public override bool OnOptionsItemSelected(IMenuItem item) { if (item.ItemId == Resource.Id.menu_disconnect) { client.Close(); this.Finish(); return(true); } return(base.OnOptionsItemSelected(item)); }
public void DisconnectDelegate(string we) { Button button = FindViewById <Button>(Resource.Id.buttonConnect); button.Post(() => { client.volumeReady = false; client.Close(); Toast.MakeText(this, Resources.GetString(Resource.String.disconnected), ToastLength.Short).Show(); Intent rtrn = new Intent(this.ApplicationContext, typeof(MainActivity)); StartActivity(rtrn); } ); }