database - android listview scrolling error -


i having problem listview, data working when im scrolling down title keeps repeating content when click working.

this image in emulator.

enter image description here

this data in database

here code use in listview

dataset_cursor = helper.getbooksbytitle2();    startmanagingcursor(dataset_cursor);         adapter = new contentadapter(dataset_cursor); list.setadapter(adapter);`  class contentadapter extends cursoradapter{     contentadapter(cursor c)     {         super(legale.this, c);     }     public void bindview(view row, context ctxt, cursor c)     {         contentholder holder = (contentholder)row.gettag();         holder.populatefrom(c, helper);     }     public view newview (context ctxt, cursor c, viewgroup parent)     {         layoutinflater inflater = getlayoutinflater();         view row = inflater.inflate(r.layout.row2, parent, false);         contentholder holder = new contentholder(row);         row.settag(holder);         return(row);     } }  public cursor getbooksbytitle2() {     return (getreadabledatabase().rawquery("select _id,table_of_content tblcontent title_id='"+ legale.passedvar.tostring() +"' order table_of_content" , null)); } 

it has view item's recycling. think not managing getview correctly.

however, suggestion set title view in list's header using addheaderview. or, perhaps take totally out listview (so visible) , set separately textview above of listview.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -