public override void Bind(ListItem item) { Name.Text = item.Name; Image.SetImageResource(item.ImageId); Action.Checked = item.State; Action.SetOnClickListener(this); ItemView.SetOnClickListener(this); _item = item; }
public void InitDropDown(ListItem l) { int j = 0; Initials = new List<TextView> (); foreach (BonLijst.Participant dude in l.Deelnemers) { string[] subnames = dude.name.Split (' '); string initials; if (subnames.Length == 1) { if (subnames [0].Length == 1) { initials = subnames [0] [0].ToString () + "."; } else { initials = subnames [0] [0].ToString () + subnames [0] [1].ToString () + "."; } } else { initials = subnames [0] [0].ToString () + "." + subnames [1] [0].ToString () + "."; } TextView initialTextView = new TextView (Application.Context); initialTextView.Text = initials; initialTextView.SetTextColor (Android.Graphics.Color.Black); initialTextView.TextSize = 30; initialTextView.SetPadding(16, 16, 16, 16); //initialTextView.LayoutParameters = new ViewGroup.LayoutParams (ViewGroup.LayoutParams); initialTextView.SetOnClickListener(this); Initials.Add (initialTextView); DropDown.AddView(initialTextView); j++; } }
public override void Bind(ListItem item) { if (DropDown.ChildCount == 0) { InitDropDown (item); } for (int i = 0; i < item.Deelnames.Count; i++) { View v = DropDown.GetChildAt(i); if (item.Deelnames[i]) { v.SetBackgroundColor(Android.Graphics.Color.Cyan); } else { v.SetBackgroundColor (Android.Graphics.Color.Transparent); } } Product.Text = item.Name; EditProduct.Text = item.Name; Price.Text = item.Value.ToString ("F2"); EditPrice.Text = item.Value.ToString ("F2"); DropDownButton.SetOnClickListener(this); Product.SetOnClickListener(this); EditButton.SetOnClickListener (this); BackButton.SetOnClickListener (this); RemoveButton.SetOnClickListener (this); EditProduct.KeyPress += (object sender, View.KeyEventArgs e) => { e.Handled = false; if (e.Event.Action == KeyEventActions.Down && (e.KeyCode == Keycode.Enter || e.KeyCode == Keycode.Back)) { item.Name = EditProduct.Text; e.Handled = true; } }; EditPrice.KeyPress += (object sender, View.KeyEventArgs e) => { e.Handled = false; if (e.Event.Action == KeyEventActions.Down && (e.KeyCode == Keycode.Enter || e.KeyCode == Keycode.Back)) { double result; double.TryParse(EditPrice.Text, out result); if (result != 0) { item.Value = result; } e.Handled = true; } }; }
public override void Bind(ListItem item) { Name.Text = item.Name; Value.Text = item.Value.ToString("N"); StatusColor.SetImageResource(item.ImageId); ItemView.SetOnClickListener(this); ItemView.SetOnLongClickListener(this); }
public override void Bind(ListItem item) { Name.Text = item.Name; Value.Text = item.Value.ToString("N"); }
public override void Bind(ListItem item) { ItemView.SetOnClickListener(this); ItemView.SetOnLongClickListener(this); Amount.Text = item.Value.ToString("N"); Payer.Text = item.Name; Reason.Text = item.Description; Date.Text = item.StringValue; StatusColor.SetImageResource(item.ImageId); }
public override void Bind(ListItem item) { Action.SetOnClickListener(this); Name.Text = item.Name; Image.SetImageResource(item.ImageId); Action.SetImageResource (Resource.Drawable.ic_close_black_24dp); }
public abstract void Bind(ListItem item);
public override void Bind(ListItem item) { Name.Text = item.Name; Image.SetImageResource(item.ImageId); ItemView.SetOnClickListener(this); ItemView.SetOnLongClickListener(this); }
public override void Bind(ListItem item) { Item = item; Debt.Text = item.StringValue; Deelnemer.Text = item.Name; }
public override void Bind(ListItem item) { Item = item; Prijs.Text = item.StringValue.Replace('.', ','); Product.Text = item.Name; Check.Checked = item.State; }
private void DeleteContact(ListItem item) { DatabaseInterface.RemoveFromContacts(p.Id, item.Name, p.Password); Toast.MakeText(this.Activity, "Removed " + item.Name, ToastLength.Short).Show(); SwipeRefreshLayout.Refreshing = true; this.Refresh(); }
private void AddContact(ListItem item) { DatabaseInterface.AddToContacts(_persoon.Id, item.Name, _persoon.Password); Toast.MakeText(this, "Added " + item.Name, ToastLength.Short).Show(); }