1. AC Question's Avatar
    public List<Info> getInfo ()
    List<Info> results = new ArrayList<Info>();

    String selectQuery = "SELECT * FROM " + TABLE_INFO;
    SQLiteDatabase db = this.getReadableDatabase();
    Cursor cursor = db.rawQuery(selectQuery, null);

    if (cursor.moveToFirst())
    Info info = new Info(Integer.parseInt(cursor.getString(0)), cursor.getString(1), cursor.getString(2));

    } while (cursor.moveToNext());

    return results;

    thats my code for populating the list view from my database

    but the list view is empty, what more codes do i need to write, plz help
    01-19-2016 12:06 PM
  2. dpham00's Avatar
    What exactly are you trying to accomplish?
    01-19-2016 02:29 PM
  3. Me Myself1's Avatar
    i have set of records in my database

    i want to show them all in my listview

    (i am the one posted the question, at that time i was not logged in)
    01-20-2016 02:29 AM

Similar Threads

  1. How can I rid myself from Loading Launcher?
    By AC Question in forum General Help and How To
    Replies: 5
    Last Post: 02-01-2017, 02:08 AM
  2. connect to office wifi from home
    By dima manuel in forum Android 4.4 KitKat
    Replies: 5
    Last Post: 04-20-2016, 02:14 PM
  3. Replies: 12
    Last Post: 02-04-2016, 10:18 AM
  4. My Samsung S4 keeps disconnecting from WiFi, how can I stop this?
    By AC Question in forum Samsung Galaxy S4
    Replies: 6
    Last Post: 01-22-2016, 07:59 PM
  5. Will the sim card from my BlackBerry Curve fit into a Samsung S3
    By AC Question in forum Samsung Galaxy S3
    Replies: 1
    Last Post: 01-19-2016, 11:27 AM