private void CheckTag(EditText et) { TravelListItem travelListItem = (TravelListItem)_widgetPopUp. GetListItem((int)et.GetTag(Resource.Id.backgroundLayout)); string textInput = et.Text.ToString(); switch ((string)et.GetTag(Resource.Id.addPerson)) { case "location": travelListItem.Location = textInput; break; case "postcode": travelListItem.Postcode = textInput; break; case "telephone": travelListItem.TeleNumber = textInput; break; case "reason": travelListItem.Reason = textInput; break; } }
private void CheckTag(EditText et) { PeopleListItem peopleListItem = (PeopleListItem)_peopleWidgetPopUp. GetListItem((int)et.GetTag(Resource.Id.backgroundLayout)); string textInput = et.Text.ToString(); switch ((string)et.GetTag(Resource.Id.addPerson)) { case "name": peopleListItem.Name = textInput; break; case "email": peopleListItem.Email = textInput; break; case "telephone": peopleListItem.Telephone = textInput; break; case "role": peopleListItem.RoleDescription = textInput; break; } }
//public IntPtr Handle => throw new NotImplementedException(); public void AfterTextChanged(IEditable s) { int index = (int)et_.GetTag(Resource.Id.itemContentEditText); Log.Debug(TAG, "tag " + et_.GetTag(Resource.Id.itemContentEditText) + ", position = " + position_ + ", item_index = " + item_index_ + ", current_BindViewHolder = " + AllocationSendMsgItemAdapter.current_BindViewHolder + ", afterTextChanged: " + s + ", original = " + items_[index].getEditText().Text); if (!AllocationSendMsgItemAdapter.is_Bind) { if (s.ToString().Length > 0) { items_[index].setContent(s.ToString()); } } AllocationSendMsgItemAdapter.is_Bind = false; //Intent textchangeIntent = new Intent(Constants.ACTION_EDITTEXT_TEXT_CHANGE); //textchangeIntent.PutExtra("INDEX", et_.GetTag(Resource.Id.itemContentEditText).ToString()); //if (!s.Equals(items_[(int)et_.GetTag(Resource.Id.itemContentEditText)].getEditText().Text)) //if (s.ToString().Length > 0) //{ /*if (items_[index].getQuantity() != Convert.ToInt32(s.ToString())) * { * if (s.Length() > 0) * { * textchangeIntent.PutExtra("VALUE", s.ToString()); * } else * { * textchangeIntent.PutExtra("VALUE", "0"); * } * * }*/ //textchangeIntent.PutExtra("VALUE", s.ToString()); //} //else //s.ToString().length == 0 //{ /*if (items_[index].getQuantity() != 0) * { * * textchangeIntent.PutExtra("VALUE", "0"); * //context_.SendBroadcast(textchangeIntent); * }*/ //textchangeIntent.PutExtra("VALUE", "0"); //} //context_.SendBroadcast(textchangeIntent); //Intent textchangeIntent = new Intent(Constants.ACTION_ENTERING_WAREHOUSE_DIVIDED_DIALOG_TEXT_CHANGE); //textchangeIntent.PutExtra("INDEX", index.ToString()); //textchangeIntent.PutExtra("VALUE", s.ToString()); //context_.SendBroadcast(textchangeIntent); //throw new NotImplementedException(); }
//public IntPtr Handle => throw new NotImplementedException(); public void AfterTextChanged(IEditable s) { int index = (int)et_.GetTag(Resource.Id.itemQuantity); Log.Debug(TAG, "position " + et_.GetTag(Resource.Id.itemQuantity) + ", afterTextChanged: " + s + ", Quantity = " + items_[index].getQuantity()); Intent textchangeIntent = new Intent(Constants.ACTION_ENTERING_WAREHOUSE_DIVIDED_DIALOG_TEXT_CHANGE); textchangeIntent.PutExtra("INDEX", index.ToString()); if (s.ToString().Length > 0) { /*if (items_[index].getQuantity() != Convert.ToInt32(s.ToString())) * { * if (s.Length() > 0) * { * textchangeIntent.PutExtra("VALUE", s.ToString()); * } else * { * textchangeIntent.PutExtra("VALUE", "0"); * } * * }*/ textchangeIntent.PutExtra("VALUE", s.ToString()); } else //s.ToString().length == 0 { /*if (items_[index].getQuantity() != 0) * { * * textchangeIntent.PutExtra("VALUE", "0"); * //context_.SendBroadcast(textchangeIntent); * }*/ textchangeIntent.PutExtra("VALUE", "0"); } context_.SendBroadcast(textchangeIntent); //Intent textchangeIntent = new Intent(Constants.ACTION_ENTERING_WAREHOUSE_DIVIDED_DIALOG_TEXT_CHANGE); //textchangeIntent.PutExtra("INDEX", index.ToString()); //textchangeIntent.PutExtra("VALUE", s.ToString()); //context_.SendBroadcast(textchangeIntent); //throw new NotImplementedException(); }