コード例 #1
0
		private async void ShowActorsPopup ()
		{
			var builder = new Android.Support.V7.App.AlertDialog.Builder (_context);
			ListView listView = new ListView (_context);
			List<Actor> actors = await DataManager.Instance.GetAllActorsForMovie (_movie);
			listView.Adapter = new ActorsArrayAdapter (_context as Activity, actors.ToArray ());
			listView.ItemClick += (object sender, Android.Widget.AdapterView.ItemClickEventArgs e) => {
				int position = e.Position;
				Intent intent = new Intent (_context, typeof(ActorDetailActivity));
				intent.PutExtra ("selectKey", actors.ToArray () [position].id);
				_context.StartActivity (intent);
			};
			builder.SetView (listView);
			builder.SetOnDismissListener (this);
			builder.Create ().Show ();
		}