void AdapterView.IOnItemClickListener.OnItemClick(AdapterView parent, View view, int position, long id) { if (OnItemClick != null) { var holder = parent.GetItemAtPosition(position) as ListElementAdapter.ListElementHolder; OnItemClick(position, view, holder == null ? null : holder.Element); } }
bool AdapterView.IOnItemLongClickListener.OnItemLongClick(AdapterView parent, View view, int position, long id) { if (OnItemLongClick != null) { var holder = parent.GetItemAtPosition(position) as ListElementAdapter.ListElementHolder; return(OnItemLongClick(position, view, holder == null ? null : holder.Element)); } return(false); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { if (directorySelectListener != null) { var cursor = (ICursor)parent.GetItemAtPosition(position); Album album = Album.ValueOf(cursor); directorySelectListener.OnSelect(album); } }
public void OnItemSelected(AdapterView parent, View view, int position, long id) { if (position == 0) { return; } ViewToObjectMap[parent.Id](Entity, parent.GetItemAtPosition(position)); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab); string field = parent.GetItemAtPosition(position).ToString(); _selectedId = Convert.ToInt32(field.Split('-').FirstOrDefault()); fab.Visibility = Android.Views.ViewStates.Visible; }
public void OnItemSelected(AdapterView parent, View view, int position, long id) { if (position == 0) { return; } var role = (Models.Role)parent.GetItemAtPosition(position); ViewToObjectMap[parent.Id](Entity, role); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { int resource = (int)parent.GetItemAtPosition(position); if (resource > 0) { Intent intent = Intent; intent.PutExtra("res", resource); SetResult(Result.Ok, intent); Finish(); } }
public void OnItemClick(AdapterView parent, View view, int position, long rowId) { Window window = (Window)Id; // close self OuterInstance.close(Id); ActivityInfo app = (ActivityInfo)parent.GetItemAtPosition(0); // send data back if (window.data.ContainsKey("fromId")) { Bundle data = new Bundle(); data.PutParcelable("app", app); OuterInstance.sendData(Id, typeof(FloatingFolder), window.data.GetInt("fromId"), APP_SELECTOR_FINISHED_CODE, data); } }
public void OnItemClick <_T0>(AdapterView <_T0> adapter, global::Android.Views.View view, int position, long id) where _T0 : Adapter { Couchbase.Lite.Document task = (Couchbase.Lite.Document)adapter.GetItemAtPosition (position); bool @checked = ((bool)task.GetProperty("checked")); try { Task.UpdateCheckedStatus(task, @checked); } catch (CouchbaseLiteException e) { Log.E(Application.Tag, "Cannot update checked status", e); Sharpen.Runtime.PrintStackTrace(e); } }
public void OnItemSelected(AdapterView parent, View view, int position, long id) { DataSet dataset; string name = parent.GetItemAtPosition(position).ToString(); TextView attribution = FindViewById<TextView>(Resource.Id.attribution); if(provider == null) { list.TryGetValue(GetString(Resource.String.police_stations), out dataset); provider = new HeatmapTileProvider.Builder().Data(dataset.dataSet).Build(); overlay = googleMap.AddTileOverlay(new TileOverlayOptions().InvokeTileProvider(provider)); attribution.MovementMethod = LinkMovementMethod.Instance; } else{ list.TryGetValue(name, out dataset); provider.SetData(dataset.dataSet); overlay.ClearTileCache(); } list.TryGetValue(name, out dataset); attribution.TextFormatted = Html.FromHtml(string.Format(GetString(Resource.String.attrib_format), dataset.url),FromHtmlOptions.ModeCompact); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { Item item = parent.GetItemAtPosition(position).JavaCast <Item>(); // Construct an Intent as normal Intent intent = new Intent(this, typeof(DetailActivity)); intent.PutExtra(DetailActivity.EXTRA_PARAM_ID, item.id); ActivityOptions activityOptions = ActivityOptions.MakeSceneTransitionAnimation( this, // Now we provide a list of Pair items which contain the view we can transition from, and the name of the view it is // transitioning to, in the launched activity new Pair(view.FindViewById(Resource.Id.imageview_item), DetailActivity.VIEW_NAME_HEADER_IMAGE), new Pair(view.FindViewById(Resource.Id.textview_name), DetailActivity.VIEW_NAME_HEADER_TITLE) ); // Now we can start the Activity, providing the activity options as a bundle StartActivity(intent, activityOptions.ToBundle()); }
public void OnItemClick(AdapterView parent, View view, int position, long id) { var selectedItem = parent.GetItemAtPosition(position).ToString(); var GridViewItems = (LinearLayout)view; GridViewItems.SetBackgroundColor(Color.ParseColor("#ff33b5e5")); var BackSelectedItem = (LinearLayout)gvPackage.GetChildAt(backposition); if (backposition != -1) { BackSelectedItem.Selected = (false); BackSelectedItem.SetBackgroundColor(Color.Transparent); } if (backposition == position) { GridViewItems.SetBackgroundColor(Color.ParseColor("#ff33b5e5")); } backposition = position; }
public void OnItemSelected(AdapterView parent, View view, int pos, long id) { string dataset = parent.GetItemAtPosition(pos).ToString(); TextView attribution = view.FindViewById <TextView>(Resource.Id.attribution); // Check if need to instantiate (avoid setData etc twice) if (activity.mProvider == null) { activity.mProvider = new HeatmapTileProvider.Builder().Data(activity.mLists.GetValueOrDefault(activity.GetString(Resource.String.police_stations)).getData()).Build(); activity.mOverlay = activity.getMap().AddTileOverlay(new TileOverlayOptions().InvokeTileProvider(activity.mProvider)); // Render links attribution.MovementMethod = LinkMovementMethod.Instance; } else { activity.mProvider.SetData(activity.mLists.GetValueOrDefault(dataset).getData()); activity.mOverlay.ClearTileCache(); } // Update attribution attribution.TextFormatted = Html.FromHtml(string.Format(activity.GetString(Resource.String.attrib_format), activity.mLists.GetValueOrDefault(dataset).getUrl())); }
public void OnItemSelected(AdapterView parent, View view, int position, long id) { var selected_title = string.Format("{0}", parent.GetItemAtPosition(position)); Log.Debug(TAG, "OnItemSelected: " + selected_title); if (ignore_keyset_count > 0) { Log.Debug(TAG, "Ignoring item selection"); ignore_keyset_count--; return; } foreach (var item in skuDetails) { if (item.Title.Contains(selected_title)) { LaunchBilling(item, parent_activity); parent.SetSelection(0); return; } } }