Tuesday, 15 June 2010

android - take value from EditText from a ListView -



android - take value from EditText from a ListView -

i have simplecursoradapter edittext , textview, have take value every text view when button pressed,and have no ideea how create it,this simplecursoradapter class

private class edittextadapter extends simplecursoradapter { private context adcontext; public int getcount() { homecoming calatori.size()+1; } public edittextadapter(context context, int layout, cursor c, string[] from, int[] to) { super(context, layout, c, from, to); this.adcontext = context; } public view getview(int pos, view inview, viewgroup parent) { view v = inview; if (v == null) { layoutinflater inflater = (layoutinflater) adcontext .getsystemservice(context.layout_inflater_service); v = inflater.inflate(r.layout.element_lista_cipasport, null); } if (pos == getcount()){ ((textview) v.findviewbyid(r.id.text_ci)).settext("telefon"); ((edittext) v.findviewbyid(r.id.edt_ci)).sethint(""); ((edittext) v.findviewbyid(r.id.edt_ci)).setinputtype(inputtype.type_class_number); } ((textview) v.findviewbyid(r.id.text_ci)).settext(" ci/pasport "+calatori.get(pos).nume); } homecoming v; } }

android listview android-edittext

No comments:

Post a Comment