Exemplo n.º 1
0
 void ListView_ItemClick(object sender, ItemEventArgs e)
 {
     DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter;
     Element elem = dialogAdapter.ElementAtIndex(e.Position);
     if (elem != null && elem.Click != null)
         elem.Click(sender, e);
 }
Exemplo n.º 2
0
		void ListView_ItemClick(object sender, ItemEventArgs e)
		{
			var elem = this.DialogAdapter[e.Position] as Element;

			if (elem != null && elem.Click != null)
				elem.Click();
		}
Exemplo n.º 3
0
        private void spinner_ItemSelected(object sender, ItemEventArgs e)
        {
            Spinner spinner = (Spinner)sender;

            string toast = string.Format ("The planet is {0}", spinner.GetItemAtPosition (e.Position));
            Toast.MakeText (this, toast, ToastLength.Long).Show ();
        }
Exemplo n.º 4
0
 void HandlePasswordLengthSpinnerItemSelected(object sender, ItemEventArgs e)
 {
     Spinner spinner = (Spinner)sender;
     int passwordLength = generator.PasswordLength;
     int.TryParse(spinner.GetItemAtPosition(e.Position).ToString(), out passwordLength);
     generator.PasswordLength = passwordLength;
 }
Exemplo n.º 5
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var bm = ((HomeAdapter)_list.Adapter).GetRow(e.Position);
            var intent = new Intent();
            switch (bm.SortOrder)
            {
                case 0:
                    if (!String.IsNullOrEmpty(bm.Day))
                    {   // use date
                        intent.SetClass(this, typeof(SessionsActivity));
                        intent.PutExtra("SelectedDateTime", bm.Day);
                    }
                    else
                    {   // use session
                        intent.SetClass(this, typeof(SessionActivity));
                        intent.PutExtra("Code", bm.SessCode);
                    }
                    StartActivity(intent);
                    break;
                case 1:
                    intent.SetClass(this, typeof(SessionsActivity));
                    intent.PutExtra("SelectedDate", bm.Day);

                    StartActivity(intent);
                    break;
                case 2:
                    // for future use
                    break;
            }
        }
Exemplo n.º 6
0
        void _tagList_ItemClick(object sender, ItemEventArgs e)
        {
            var intent = new Intent();
            intent.SetClass(this, typeof (SessionsByTagActivity));
            intent.PutExtra("tag", _tags[e.Position]);

            StartActivity(intent);
        }
Exemplo n.º 7
0
 protected void OnListItemClick(object sender, ItemEventArgs e)
 {
     var obj = listView.Adapter.GetItem(e.Position);
     var curs = (ICursor)obj;
     var text = curs.GetString(1); // 'name' is column 1
     Android.Widget.Toast.MakeText(this, text, Android.Widget.ToastLength.Short).Show();
     System.Console.WriteLine("Clicked on " + text);
 }
Exemplo n.º 8
0
        void _speakerList_ItemClick(object sender, ItemEventArgs e)
        {
            var intent = new Intent();
            intent.SetClass(this, typeof (SpeakerActivity));
            intent.PutExtra("email", _speakers[e.Position].Email);

            StartActivity(intent);
        }
Exemplo n.º 9
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var tag = ((TagsAdapter)_list.Adapter).GetRow(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof(SessionsActivity));
            intent.PutExtra("Tag", tag.Value);

            StartActivity(intent);
        }
Exemplo n.º 10
0
        void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var item = (ICursor)_list.Adapter.GetItem(e.Position);
            int id = item.GetInt(item.GetColumnIndex("_id"));
            var intent = new Intent(Intent.ActionView);
            var uri = Uri.WithAppendedPath(ContactsContract.Contacts.ContentUri, id.ToString());

            intent.SetData(uri);
            StartActivity(intent);
        }
Exemplo n.º 11
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var session = ((SessionsAdapter)_list.Adapter).GetRow(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof(SessionActivity));
            intent.PutExtra("Code", session.Code);

            StartActivity(intent);
        }
Exemplo n.º 12
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var speaker = ((SpeakersAdapter)_list.Adapter).GetRow(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof(SpeakerActivity));
            intent.PutExtra("Name", speaker.Name);

            StartActivity(intent);
        }
 void ListView_ItemClick(object sender, ItemEventArgs e)
 {
     viewModel.SelectedCageballEvent = viewModel.CageballEvents[e.Position];
     var intent = new Intent();
     intent.SetClass(this, typeof(SignedCageballEventActivity));
     intent.PutExtra("id", viewModel.SelectedCageballEvent.Id);
     intent.PutExtra("signUp", false);
     
     StartActivity(intent);
 }
Exemplo n.º 14
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            var note = ((NoteListAdapter)_list.Adapter).GetNote(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof(ViewNoteActivity));
            intent.PutExtra("Title", note.Title);
            intent.PutExtra("Contents", note.Contents);

            StartActivity(intent);
        }
Exemplo n.º 15
0
        void _list_ItemClick(object sender, ItemEventArgs e)
        {
            ICursor item = (ICursor)_list.Adapter.GetItem(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof(ViewNoteActivity));
            intent.PutExtra("Title", item.GetString(item.GetColumnIndex(NoteDatabaseConstants.TitleColumn)));
            intent.PutExtra("Content", item.GetString(item.GetColumnIndex(NoteDatabaseConstants.ContentColumn)));

            StartActivity(intent);
        }
Exemplo n.º 16
0
        void sponsorList_ItemClick(object sender, ItemEventArgs e)
        {
            var sponsor = _adapter.GetItemAtPosition(e.Position);
            var intent = new Intent();
            intent.SetClass(this, typeof (SponsorActivity));
            intent.PutExtra("name", sponsor.Name);
            intent.PutExtra("description", sponsor.Description);
            intent.PutExtra("website", sponsor.Website);

            StartActivity(intent);
        }
Exemplo n.º 17
0
        private void _list_ItemClick(object sender, ItemEventArgs e)
        {
            System.Console.WriteLine("[MainActivity] _list_ItemClick " + e.Position);

            var restaurant = ((MainListAdapter)_list.Adapter).GetCategory(e.Position);

            var intent = new Intent();

            intent.SetClass(this, typeof(RestaurantActivity));
            intent.PutExtra("Name", restaurant.Name);

            StartActivity(intent);
        }
Exemplo n.º 18
0
        private void QuantitySpinner_ItemSelected(object sender, ItemEventArgs e)
        {
            if (e.Position > -1)
            {
                var selQty = mQuantities[e.Position];

                var adapter = new ArrayAdapter<IUnit>(this, Android.Resource.Layout.SimpleSpinnerItem,
                                                      selQty.Units.ToArray());
                adapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);

                mFromUnitSpinner.Adapter = adapter;
                mToUnitSpinner.Adapter = adapter;
            }
            else
            {
                mFromUnitSpinner.Adapter = null;
                mToUnitSpinner.Adapter = null;
            }
        }
Exemplo n.º 19
0
 public void OnItemClick(object parent, ItemEventArgs args)
 {
     // Pre-load the image then start the animation
     mImageView.SetImageResource (PHOTOS_RESOURCES[args.Position]);
     ApplyRotation (args.Position, 0, 90);
 }
Exemplo n.º 20
0
        void assignmentsListView_ItemClick(object sender, ItemEventArgs e)
        {
            var item = this.assignmentListAdapter.GetItemAtPosition(e.Position);
            Toast.MakeText(this, item.Assignment_Name + " Clicked!", ToastLength.Short).Show();

            {

            }
        }
Exemplo n.º 21
0
        /// <summary>
        /// The on-click listener for all devices in the ListViews
        /// </summary>
        void DeviceListClick(object sender, ItemEventArgs e)
        {
            // Cancel discovery because it's costly and we're about to connect
            btAdapter.CancelDiscovery ();

            // Get the device MAC address, which is the last 17 chars in the View
            var info = (e.View as TextView).Text.ToString ();
            var address = info.Substring (info.Length - 17);

            // Create the result Intent and include the MAC address
            Intent intent = new Intent ();
            intent.PutExtra (EXTRA_DEVICE_ADDRESS, address);

            // Set result and finish this Activity
            SetResult (Result.Ok, intent);
            Finish ();
        }
Exemplo n.º 22
0
 private void listView_ItemClick(object sender, ItemEventArgs e)
 {
     _presenter.ViewPortfolio(e.Position);
 }
Exemplo n.º 23
0
 private void UnitSpinner_ItemSelected(object sender, ItemEventArgs e)
 {
     UpdateToAmount();
 }
Exemplo n.º 24
0
 private void showDetails(object sender, ItemEventArgs  e)
 {
     ListView aListView = (ListView)sender;
     GenericAdapter<Item> adapter = (GenericAdapter<Item>)aListView.Adapter;
     Item selectedItem = new Item();
     selectedItem = adapter.GetItem(e.Position);
     Intent intent = new Intent(this.BaseContext, (Java.Lang.Class) new ItemDetailActivity().Class);
     intent.AddFlags(ActivityFlags.NewTask);
     intent.PutExtra("CurrentItem",string.Format("{0}|{1}",selectedItem.Key,selectedItem.Value));
     StartActivity(intent);
 }
Exemplo n.º 25
0
 private void spinner_ItemSelected(object sender, ItemEventArgs e)
 {
     Toast.MakeText(e.View.Context, "The planet is " + ((TextView) e.View).Text, ToastLength.Long).Show();
 }
Exemplo n.º 26
0
		/// <summary>
		/// mc++ Obsolete!
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		void ListView_ItemClick(object sender, ItemEventArgs e)
		{
			var elem = this.DialogAdapter.ElementAtIndex(e.Position);
			if(elem != null)
				elem.Selected();
		}
Exemplo n.º 27
0
 private void gridView_ItemClick(object sender, ItemEventArgs e)
 {
     Toast.MakeText(e.View.Context, "" + e.Position, ToastLength.Short).Show();
 }
Exemplo n.º 28
0
        void _slots_ItemClick(object sender, ItemEventArgs e)
        {
            var session = _adapter.GetItemAtPosition(e.Position);

            var intent = new Intent();
            intent.SetClass(this, typeof (SessionActivity));
            intent.PutExtra("key", session.Key);

            StartActivity(intent);
        }
Exemplo n.º 29
0
 void ListView_ItemLongClick(object sender, ItemEventArgs e)
 {
     Element elem = this.DialogAdapter.ElementAtIndex(e.Position);
     if (elem != null && elem.LongClick != null)
         elem.LongClick(sender, e);
 }
 void ConfigList_ItemClick(object sender, ItemEventArgs e)
 {
     SaveConfiguration();
 }