Edit Text duplicate values in ListView Android -


i new in android. want add edit text inside listview, there duplicate values.

for example, when press edit text index 1, focuses on edit text index 4 .

my code below.


inside asynctask:

        if(jsonstring!=null){             try{                 jsonarray orderdetails = new jsonarray(jsonstring);                  for(int = 0 ; i<orderdetails.length();i++){                     jsonobject p = orderdetails.getjsonobject(i);                     string productcode = p.getstring("productcode");                     string ordercodedetail = p.getstring("code");                     integer orderquantity = p.getint("quantity");                     (int x = 0; x < orderquantity; x++) {                      string filterproducturl = ""+baseurl+"products?filter={\"where\":{\"code\":\""+productcode+"\"}}";                     httphandler sh2 = new httphandler();                     string jsonstr2 = sh2.makeservicecall(filterproducturl);                      if(jsonstr2 != null){                          try {                                 jsonarray productdetails = new jsonarray(jsonstr2);                                 (int j = 0; j < productdetails.length(); j++) {                                      jsonobject q = productdetails.getjsonobject(j);                                     productname = q.getstring("name");                                     productimage = q.getstring("image");                                     string encodeimage = productimage.replace("data:image/jpeg;base64,", "").replace("data:image/png;base64,", "");                                     byte[] decodedstring = base64.decode(encodeimage, base64.default);                                         base64bitmap = bitmapfactory.decodebytearray(decodedstring, 0, decodedstring.length);                                     itemcount = itemcount +1;                                           hashmap<string, object> productdata = new hashmap<string, object>();                                         productdata.put("orderquantity",orderquantity);                                         productdata.put("productname", productname);                                         productdata.put("base64bitmap", base64bitmap);                                         productdata.put("ordercodedetail", ordercodedetail);                                         orderdetaillist.add(productdata); ..... 

my adapter:

@override public view getview(int position, view convertview, viewgroup parent) {     minflater = (layoutinflater) context.getsystemservice(context.layout_inflater_service);         return this.createviewfromresource(position, convertview, parent, layout); }  private view createviewfromresource(int position, view convertview,                                     viewgroup parent, int resource) {     view v;     if (convertview == null) {         v = minflater.inflate(resource, parent, false);     } else {         v = convertview;     }      this.bindview(position, v);      return v; } 


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -