java - SimpleCursorAdapter doesn't return any object in listview -


i use simplecursoradapter in app rows db , not receive error, tryed put values in db can't see filled listview. post code below better explanation.

fragmenttab2.java

@override public view oncreateview(layoutinflater inflater, viewgroup container,         bundle savedinstancestate) {      view view = inflater.inflate(r.layout.fragmenttab2, container, false);      d= new database(getactivity());     cursor c = d.getbarcode();      cursorloader(c);      string from[] = {codice.dati_id,             codice.dati_barcode};      int to[] = {r.id.record_id,             r.id.record_barcode};      @suppresswarnings("deprecation")     simplecursoradapter sca = new simplecursoradapter(view.getcontext(),             r.layout.singolo_elemento_card,             c, from, to);     cardbarcode = (listview) view.findviewbyid(r.id.barcode_list);     cardbarcode.setadapter(sca);       cardbarcode.setclickable(true);     cardbarcode.setonitemclicklistener(new adapterview.onitemclicklistener() {          public void onitemclick(adapterview<?> parent, view v, int position,                 long id) {           }     });     return view; } private void cursorloader(cursor c) {     // todo auto-generated method stub  } 

in database.java:

 public cursor getbarcode(){          cursor c= db.query(codice.table_card, null ,                      null ,                      null ,                      null ,                      null ,                       null );          return c;  } 


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -