private void mListView_itemClick(object sender, AdapterView.ItemClickEventArgs e) { var v = mListView.Adapter.GetView(e.Position, null, null); var idaccount = (TextView)v.FindViewById(Resource.Id.Manage_Selecteedtable_Name); IDACCOUNT = idaccount.Text; StartActivity(typeof(WP_CustomerOrder)); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { FragmentTransaction t = FragmentManager.BeginTransaction(); dialog_ingredient dialog = new dialog_ingredient(); dialog.Show(t, "dialog fragment"); dialog.myOnUpdateComplete += Dialog_myOnUpdateComplete; }
void OnItemClick (object sender, AdapterView.ItemClickEventArgs e) { TreeItem selectedItem = DC.CurrentList[e.Position]; var newData = DC.AddNewDataForLevel (selectedItem); var exp = new Expand<TreeItem> (DC); exp.ManipulateCollection (selectedItem, newData); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { var soundEffect = Sounds.Tap; switch (position) { case 0: StartActivity(new Intent(this, typeof (CardsActivity))); break; case 1: StartActivity(new Intent(this, typeof (BingImagesActivity))); break; case 2: StartActivity(new Intent(this, typeof(SelectGestureDemoActivity))); break; case 3: StartActivity(new Intent(this, typeof (ThemingActivity))); break; default: soundEffect = Sounds.Error; break; } // Play sound. var am = (AudioManager) GetSystemService(Context.AudioService); // wonky cast am.PlaySoundEffect((SoundEffect) soundEffect); }
private void _list_ItemClick(object sender, AdapterView.ItemClickEventArgs 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; } }
private void spinner_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; string toast = string.Format ("Selection: {0}", spinner.GetItemAtPosition (e.Position)); Toast.MakeText (this, toast, ToastLength.Long).Show (); }
private void examineTeamSpinner_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; String selTeam = (string)spinner.GetItemAtPosition (e.Position); currentTeam = simLeague.leagueTeams.Find (t => t.name == selTeam); updateCurrTeam (); }
void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e) { var detail = detailList[e.Position]; CallEntity callEntity = CallWrapper.WrapCall(UserData.CPRNR, CallUtil.StatusCode.Active, category, Title, detail); Call.MakeCall(callEntity, this); }
public bool OnItemLongClick(AWidget.AdapterView parent, AViews.View view, int position, long id) { object selectedItem = null; //if (_element.ItemsSource.GetType().GetInterfaces().Any(x => x == typeof(IGroupedOrderable))) if (element.ItemsSource is IGroupedOrderableCollection grouped) { selectedItem = grouped.GetItemFromFlatIndex(id); } else { selectedItem = ((IList)element.ItemsSource)[(int)id]; } // Creating drag state DragItem dragItem = new DragItem(NormalizeListPosition(position), view, selectedItem); // Creating a blank clip data object (we won't depend on this) var data = ClipData.NewPlainText(string.Empty, string.Empty); // Creating the default drag shadow for the item (the translucent version of the view) // NOTE: Can create a custom view in order to change the dragged item view AViews.View.DragShadowBuilder shadowBuilder = new AViews.View.DragShadowBuilder(view); // Setting the original view cell to be invisible view.Visibility = AViews.ViewStates.Invisible; // NOTE: this method is introduced in Android 24, for earlier versions the StartDrag method should be used view.StartDragAndDrop(data, shadowBuilder, dragItem, 0); return(true); }
void OnItemClick(object sender, AdapterView.ItemClickEventArgs e) { App.Instance.SetCacheItem (DataCacheEnum.CURRENTACCOUNT, accounts [e.Position]); App.Instance.ClearCacheItem (DataCacheEnum.DASHBOARD); Activity.StartActivity (typeof(DashboardActivity)); Activity.Finish (); }
private void namespacesList_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { var option = e.View.FindViewById<CheckedTextView>(Resource.Id.NamespaceOption); if (!_adapter.CurrentNamespaces.Contains(option.Text)) { option.Checked = true; _adapter.CurrentNamespaces.Add(option.Text); MessageHub.Instance.Publish(new AddNamespaceMessage(this, option.Text)); } else { if (_preferences.GetBoolean(PreferenceKeys.ShowRemoveNamespaceMessage, true)) { new AlertDialog.Builder(this) .SetTitle(Resource.String.RemoveNamespaceMessageTitle) .SetMessage(Resource.String.RemoveNamespaceMessageContent) .SetPositiveButton(Resource.String.RemoveNamespaceMessageOkButton, (s, a) => { }) .Show(); // disabling this for now so the message will get shown every time // may or may not decide to add this back in //_preferences // .Edit() // .PutBoolean(PreferenceKeys.ShowRemoveNamespaceMessage, false) // .Commit(); } } }
async void OnAlbumItemClicked (object sender, AdapterView.ItemClickEventArgs e) { var selectedEpisode = _album.Episodes [e.Position]; if (AndroidAudioDownloader.ViewsDownloadInProgressByAudioId.ContainsKey (selectedEpisode.RemoteUrl)) { return; } if (AudioDownloader.HasLocalFile (selectedEpisode.RemoteUrl, selectedEpisode.FileSize)) { var resultIntent = new Intent (); ExtraUtils.PutEpisode (resultIntent, selectedEpisode.Id); ExtraUtils.PutAlbum (resultIntent, _album.Id); ExtraUtils.PutSelectedTab (resultIntent, (int) MainActivity.TabTitle.Player); SetResult (Result.Ok, resultIntent); StartService (PlayerService.CreateIntent ( this, PlayerService.ACTION_PLAY, _album.Id, selectedEpisode.Id )); Finish (); } else { await AndroidAudioDownloader.StartDownloadAsync (e.Position, selectedEpisode.RemoteUrl, ListView); } }
void ListView_ItemLongClick (object sender, AdapterView.ItemLongClickEventArgs e) { var elem = this.DialogAdapter.ElementAtIndex(e.Position); if (elem != null && elem.LongClick != null) { elem.LongClick(); } }
void ModuleListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { // Set selected level as current DataHolder.Current.CurrentModule = DataHolder.Current.CurrentLevel.Modules.ElementAt(e.Position); if (!DataHolder.Current.CurrentModule.Lessons.Any()) { Toast.MakeText(this, "This module has not been implemented yet.", ToastLength.Short).Show(); return; } DataHolder.Current.CurrentLesson = DataHolder.Current.CurrentModule.Lessons.First(); DataHolder.Current.CurrentIteration = DataHolder.Current.CurrentLesson.Iterations.First(); if (String.IsNullOrEmpty(DataHolder.Current.CurrentModule.VideoPath)) { // Navigate to lesson view var intent = new Intent(this, typeof(LessonFameActivity)); StartActivity(intent); } else { // Navigate to video player var intent = new Intent(this, typeof(VideoActivity)); var bundle = new Bundle(); bundle.PutString("nextView", "LessonFrameActivity"); intent.PutExtras(bundle); StartActivity(intent); } }
void ItemSelectedHandler( object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; var makeToPass = Convert.ToString (spinner.GetItemAtPosition (e.Position)); mListener.passMake (makeToPass); }
public bool OnItemLongClick(AdapterView <object> adapterView, View view, int position, long id) { var args = new AdapterView.ItemClickEventArgs((AdapterView)adapterView, view, position, id); Invoke(adapterView, args); return(args.IsHandled); }
public void OnItemClick(Android.Widget.AdapterView parent, Android.Views.View view, int position, long id) { var lstMainMenu = (ListView)this.FindViewById(Resource.Id.lstMainMenu); if (position == MainMenuAdapter.CLEAN_UP_TEST) { CleanUp(); } else if (position == MainMenuAdapter.ADD_SQL_RECORDS) { AddRecords(); } else if (position == MainMenuAdapter.DISPLAY_ALL_RECORDS) { ShowAllRecords(); } else if (position == MainMenuAdapter.DISPLAY_RECORDS_WITH_WHERE) { ShowRecordsWith(); } else if (position == MainMenuAdapter.SAVE_LARGE_FILE) { SaveLargeFile(); } else if (position == MainMenuAdapter.DISPLAY_LARGE_FILE) { LoadAndDisplayFile(); } }
private void OnItemClick(object sender, AdapterView.ItemClickEventArgs itemClickEventArgs) { MvxTrace.Trace("Item clicked {0}", itemClickEventArgs.Position); var selectedObject = Adapter.ItemsSource[itemClickEventArgs.Position]; MvxTrace.Trace("Item is {0}", selectedObject); SelectedObject = selectedObject; }
void moviesSpinner_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; string toast = string.Format(spinner.GetItemAtPosition(e.Position).ToString()); Toast.MakeText(this, toast, ToastLength.Long).Show(); }
void OnGridThemeChanged (object sender, AdapterView.ItemSelectedEventArgs e) { if (e.Position == 0) { sfGrid.GridStyle = defaultStyle; sfGrid.AlternatingRowColor = Color.Rgb (206, 206, 206); } if (e.Position == 1) { sfGrid.GridStyle = darkStyle; sfGrid.AlternatingRowColor = Color.Rgb (25, 25, 25); } if (e.Position == 2) { sfGrid.GridStyle = blueStyle; sfGrid.AlternatingRowColor = Color.Rgb (230, 239, 237); } if (e.Position == 3) { sfGrid.GridStyle = redStyle; sfGrid.AlternatingRowColor = Color.Rgb (252, 242, 240); } if (e.Position == 4) { sfGrid.GridStyle = greenStyle; sfGrid.AlternatingRowColor = Color.Rgb (248, 249, 229); } }
void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { var elem = this.DialogAdapter[e.Position] as Element; if (elem != null && elem.Click != null) elem.Click(); }
private void stateSpin_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; var main = new Intent (this, typeof(MainActivity)); TextView selectedState = FindViewById<TextView> (Resource.Id.stateSelected); string selectedItem = Convert.ToString (spinner.GetItemAtPosition (e.Position)); string selStateString; if (selectedItem != "State") { selStateString = string.Format ("Thou Art At {0}", spinner.GetItemAtPosition (e.Position)); } else { selStateString = string.Empty; } selectedState.SetText (selStateString,TextView.BufferType.Normal); stateSelection = selectedItem; main.PutExtra("settings", ConstructedResult(stateSelection, regionSelection)); // main.PutExtra ("stateSel", selectedStateToMain); SetResult (Result.Ok, main); }
private void OnItemClick(object sender, AdapterView.ItemClickEventArgs e) { var borrowersListView = (BorrowersListView)Element; var enumerable = borrowersListView.Items; var borrowers = enumerable.ToList(); borrowersListView.NotifyItemSelected(borrowers[e.Position-1]); }
void OnListEventClick(object sender, AdapterView.ItemClickEventArgs e) { var fragTx = FragmentManager.BeginTransaction(); var frag = new ViewAttendeeFragment(); fragTx.Replace(Resource.Id.framelayout_maincontainer, frag); fragTx.Commit(); }
void GridOnItemClick(object sender, AdapterView.ItemClickEventArgs itemClickEventArgs) { var intent = new Intent(Activity, typeof(FriendActivity)); intent.PutExtra("Title", friends[itemClickEventArgs.Position].Title); intent.PutExtra("Image", friends[itemClickEventArgs.Position].Image); StartActivity(intent); }
void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e) { ListView listView = sender as ListView; Intent i = new Intent(this, typeof(EventDetails)); i.PutExtra("idEvent", listEvents[e.Position].idEvent); StartActivity(i); }
void ListView_Click(object sender, AdapterView.ItemClickEventArgs e) { Item itm = adapter[e.Position];// listData.ElementAt (e.Position); var intent = new Intent (this, typeof(ItemActivity)); intent.PutExtra ("icode", itm.ICode); StartActivity (intent); }
void ListView_ItemLongClick(object sender, AdapterView.ItemLongClickEventArgs e) { DialogAdapter dialogAdapter = this.ListAdapter as DialogAdapter; Element elem = dialogAdapter.ElementAtIndex(e.Position); if (elem != null && elem.LongClick != null) elem.LongClick(sender, e); }
void AdapterView.IOnItemSelectedListener.OnNothingSelected(AdapterView parent) { if (OnNothingSelected != null) { OnNothingSelected(); } }
private void chooseTeamSpinner_ItemSelected (object sender, AdapterView.ItemSelectedEventArgs e) { Spinner spinner = (Spinner)sender; userTeam = (string)spinner.GetItemAtPosition (e.Position); string toast = string.Format ("Your team is {0}", userTeam); Toast.MakeText (this, toast, ToastLength.Long).Show (); }
private void SpinnerItemSelected(object sender, AdapterView.ItemSelectedEventArgs e) { var spinner = Spinner; if (spinner == null) return; var newValue = spinner.Adapter.GetRawItem(e.Position); bool changed; if (newValue == null) { changed = (_currentValue != null); } else { changed = !(newValue.Equals(_currentValue)); } if (!changed) { return; } _currentValue = newValue; FireValueChanged(newValue); }
private void OnItemClick(object sender, AdapterView.ItemClickEventArgs e) { var person = _people[e.Position]; var intent = new Intent(this, typeof(PersonDetailActivity)); intent.PutExtra("PersonId", person.Id); StartActivity(intent); }
void ListView_ItemClick(object sender, AdapterView.ItemClickEventArgs e) { Account account = ((ListAdapter<Account>)listView.Adapter).GetItem(e.Position); var intent = new Intent (this, typeof(TransactionActivity)); intent.PutExtra ("AccountId", account.Id); StartActivity (intent); }
/// <summary> /// Default ctor /// </summary> public ItemClickEventArgs(AdapterView parent, View view, int position, long id) { Parent = parent; Id = id; Position = position; View = view; }
public bool OnItemLongClick(Android.Widget.AdapterView parent, Android.Views.View view, int position, long id) { var selectedItem = ((IList)Element.ItemsSource) [(int)id]; TemporalObject tmpObj = new TemporalObject(view, selectedItem); ClipData data = ClipData.NewPlainText(string.Empty, string.Empty); DragShadowBuilder shadowBuilder = new global::Android.Views.View.DragShadowBuilder(view); view.StartDrag(data, shadowBuilder, tmpObj, 0); return(true); }
public bool OnItemLongClick(Android.Widget.AdapterView parent, Android.Views.View view, int position, long id) { var selectedItem = ((IList)_element.ItemsSource)[(int)id]; // Creating drag state DragItem dragItem = new DragItem(NormalizeListPosition(position), view, selectedItem); // Creating a blank clip data object (we won't depend on this) var data = ClipData.NewPlainText(string.Empty, string.Empty); // Creating the default drag shadow for the item (the translucent version of the view) // NOTE: Can create a custom view in order to change the dragged item view AViews.View.DragShadowBuilder shadowBuilder = new AViews.View.DragShadowBuilder(view); // Setting the original view cell to be invisible view.Visibility = ViewStates.Invisible; // NOTE: this method is introduced in Android 24, for earlier versions the StartDrag method should be used view.StartDragAndDrop(data, shadowBuilder, dragItem, 0); return(true); }
/// <summary> /// Handler for Long Click event from <paramref name="view"/> /// </summary> /// <param name="parent"> /// The parent list view . /// </param> /// <param name="view"> /// The view that triggered the long click event /// </param> /// <param name="position"> /// The position of the view in the list (has to be normalized, includes headers). /// </param> /// <param name="id"> /// The id of the item that triggered the event (must be bigger than 0 under normal circumstances). /// </param> /// <returns> /// The <see cref="bool"/> flag that identifies whether the event is handled. /// </returns> public bool OnItemLongClick(AWidget.AdapterView parent, AViews.View view, int position, long id) { var selectedItem = ((IList)_element.ItemsSource)[(int)id]; DragItem dragItem = new DragItem(NormalizeListPosition(position), view, selectedItem); var data = ClipData.NewPlainText(string.Empty, string.Empty); AViews.View.DragShadowBuilder shadowBuilder = new AViews.View.DragShadowBuilder(view); view.Visibility = ViewStates.Invisible; if (Build.VERSION.SdkInt >= BuildVersionCodes.N) { view.StartDragAndDrop(data, shadowBuilder, dragItem, 0); } else { view.StartDrag(data, shadowBuilder, id, 0); } return(true); }
public void OnNothingSelected(AdapterView <object> adapterView) { NothingSelected.Invoke(adapterView, System.EventArgs.Empty); }
public void OnItemSelected(AdapterView <object> adapterView, View view, int position, long id) { ItemSelected.Invoke(adapterView, new AdapterView.ItemSelectedEventArgs((AdapterView)adapterView, view, position, id)); }
/// <summary> /// Invoke /// </summary> public void OnItemClick(AdapterView <object> adapterView, View.View view, int position, long id) { Invoke(adapterView, new ItemClickEventArgs(view, position, id)); }
public void OnNothingSelected(Android.Widget.AdapterView parent) { // throw new NotImplementedException (); }