Placing listview in Getview method in Android -
i have custom list created getview method, , want place custom listview in each row on custom list. should like:
row1 list text1 text2 text1 text2 text1 text2 row2 list text1 text2 text1 text2 text1 text2 row3 list text1 text2 text1 text2 text1 text2but seems can't add together getview method main getview. has suggestion? thanks
edit:
public static class childadapter extends baseadapter { private layoutinflater minflater; public irrigationadapter(context context) { minflater = layoutinflater.from(context); } public int getcount() { homecoming array.size(); } public object getitem(int position) { homecoming position; } public long getitemid(int position) { homecoming position; } public view getview(final int position, view convertview, viewgroup parent) { final viewholder holder; if (convertview == null) { convertview = minflater.inflate(r.layout.table_row1, null); holder = new viewholder(); holder.text1 = (textview) convertview.findviewbyid(r.id.textview01); holder.text2 = (textview) convertview.findviewbyid(r.id.textview02); convertview.settag(holder); } else { holder = (viewholder) convertview.gettag(); } holder.text1.settext(sulamadonemarr.get(position)); holder.text2.settext(bitkidesenarr.get(position)); homecoming convertview; } static class viewholder { textview text1; textview text2; } } private static class mainadapter extends baseadapter { private layoutinflater minflater; public sulamadetayadapter(context context) { minflater = layoutinflater.from(context); } public int getcount() { homecoming arraysize; } public object getitem(int position) { homecoming position; } public long getitemid(int position) { homecoming position; } public view getview(final int position, view convertview, viewgroup parent) { final viewholder holder; if (convertview == null) { convertview = minflater.inflate(r.layout.table_row_sulamabaslama_detay, null); holder = new viewholder(); holder.text1= (textview)convertview.findviewbyid(r.id.txt); holder.childadapterlist.setadapter(????); convertview.settag(holder); } else { holder = (viewholder) convertview.gettag(); } homecoming convertview; } static class viewholder { textview text1,text2; listview childadapterlist; }
}
it
you can utilize expandable list view on each row. can perform similar want.
android listview custom-lists
No comments:
Post a Comment