android - The cursor has data, but ListFragment only shows empty view -
i ios developer, , working on android project starter. have been stuck in next issue 1 day. please give me help.
might duplicated another stack question, no 1 has answered question.
my problem happened in next code. log.d shows cursor has data, listfragment shows empty view.
and here imageslistadapter
public class imageslistadapter extends simplecursoradapter { private static final string tag = imageslistadapter.class.getsimplename(); static final string[] = new string[] {imagedata.c_link_url }; static final int[] = new int[] { r.id.coupon_lbl}; // constructor public imageslistadapter(context context, cursor c) { super(context, r.layout.image_cell, c, from, to, 0); } // actual binding of cursor view happens @override public void bindview(view row, context context, cursor cursor) { super.bindview(row, context, cursor); // manually bind created @ timestamp view log.d(tag,"binding view."); string link = cursor.getstring(cursor.getcolumnindex(imagedata.c_link_url)); textview textcreatedat = (textview) row.findviewbyid(r.id.coupon_lbl); textcreatedat.settext(link); } }
where shall start debug this?
the codes fine, , 1 of friends run code ide, , moved setlistadapter() "oncreateview", works. however, got nil when did same. weird...
i decided utilize listactivity @ moment, , works expected.
thanks help , suggestions.
android android-listfragment simplecursoradapter
No comments:
Post a Comment