コード例 #1
0
ファイル: DialogActivity.cs プロジェクト: 284247028/MvvmCross
 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);
 }
コード例 #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();
		}
コード例 #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 ();
        }
コード例 #4
0
ファイル: Activity1.cs プロジェクト: mkoby/PasswordGenerator
 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;
 }
コード例 #5
0
ファイル: HomeActivity.cs プロジェクト: ganeshan/Monospace11
        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;
            }
        }
コード例 #6
0
ファイル: TagsActivity.cs プロジェクト: jorik041/NycCodeCamp6
        void _tagList_ItemClick(object sender, ItemEventArgs e)
        {
            var intent = new Intent();
            intent.SetClass(this, typeof (SessionsByTagActivity));
            intent.PutExtra("tag", _tags[e.Position]);

            StartActivity(intent);
        }
コード例 #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);
 }
コード例 #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);
        }
コード例 #9
0
ファイル: TagsActivity.cs プロジェクト: ganeshan/Monospace11
        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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #13
0
 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);
 }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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;
            }
        }
コード例 #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);
 }
コード例 #20
0
ファイル: Activity1.cs プロジェクト: rawbenny/ListViewSample
        void assignmentsListView_ItemClick(object sender, ItemEventArgs e)
        {
            var item = this.assignmentListAdapter.GetItemAtPosition(e.Position);
            Toast.MakeText(this, item.Assignment_Name + " Clicked!", ToastLength.Short).Show();

            {

            }
        }
コード例 #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 ();
        }
コード例 #22
0
 private void listView_ItemClick(object sender, ItemEventArgs e)
 {
     _presenter.ViewPortfolio(e.Position);
 }
コード例 #23
0
 private void UnitSpinner_ItemSelected(object sender, ItemEventArgs e)
 {
     UpdateToAmount();
 }
コード例 #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);
 }
コード例 #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();
 }
コード例 #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();
		}
コード例 #27
0
 private void gridView_ItemClick(object sender, ItemEventArgs e)
 {
     Toast.MakeText(e.View.Context, "" + e.Position, ToastLength.Short).Show();
 }
コード例 #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);
        }
コード例 #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);
 }
コード例 #30
0
 void ConfigList_ItemClick(object sender, ItemEventArgs e)
 {
     SaveConfiguration();
 }