android - To get data from another activity -


the question asking might have been asked have got stuck. want pass data edittext of 1 activity listview in activity how can that. have used intent putextra , not able implement function can tell me how implement function on listview.

private static class listviewadapter extends baseadapter{      private layoutinflater linflate;     private object convertview;      public listviewadapter(context context)     {         linflate=layoutinflater.from(context);     }     @override     public int getcount() {         // todo auto-generated method stub         return listviewcontent.size();     }      @override     public object getitem(int arg0) {         // todo auto-generated method stub         return null;     }      @override     public long getitemid(int arg0) {         // todo auto-generated method stub         return 0;     }      @override     public view getview(int position, view v, viewgroup arg2) {         final listcontent holder;           if (v== null) {             v = linflate.inflate(r.layout.listviewinflator, null);              holder = new listcontent();             holder.text = (textview) v.findviewbyid(r.id.textview01);            holder.text.setcompounddrawables(v.getresources().getdrawable(r.drawable.ic_launcher), null, null, null);              v.settag(holder);          } else {              holder = (listcontent)v.gettag();         }           holder.text.settext(listviewcontent.get(position));                 return v;     }      static class listcontent {         textview text;   }    } private static final arraylist<string> listviewcontent = new arraylist<string>();  } 

on want set method.

make model class , serialize it.pass object of class

 putserializable("object", object); 

get object in second class -

bundle bundel = getintent().getextras();              object = (myclass) bundel.get("object");   

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -