java - How can I fill the first line in a list view before filling it with my custom adapter? -
i want fill first listview line int method in databasehelper, , fill rest of view.
all can find googleing how arrayadapter
this how fill view now:
new handler().post(new runnable(){ @override public void run(){ cursoradapter = new customcursoradapter(mainactivity.this, contactdbhelper.listall()); listview.setadapter(cursoradapter); } });
what want fill first line coming int method.
contactdbhelper.countcontact();
any ideas?
try using listvew.addheaderview(view view)
listview lv=(listview) findviewbyid(r.id.listview1); textview header=new textview(getapplicationcontext()); header.settext("header"); lv.addheaderview(header);
java android android-listview android-adapter
No comments:
Post a Comment