How to create an Activity for a single?

Asked

Viewed 25 times

0

How do I rescue the sqlite data and send it to the xml single? My Sqliteopenhelper:

// Getting single
Contact getSingle(int id) {
SQLiteDatabase db = this.getReadableDatabase();

Cursor cursor = db.query(TABLE_SINGLE, new String[] { KEY_ID,
KEY_NAME, KEY_DESCRICAO}, KEY_ID + "=?",
new String[] { String.valueOf(id) }, null, null, null, null);
if (cursor != null)
cursor.moveToFirst();

Contact single = new Contact(Integer.parseInt(cursor.getString(0)),
cursor.getString(1), cursor.getString(2));

// return single
return single;

}
  • I did not understand very well what is an/o "xml single", could clarify better?

  • I got what I needed on this [Link][1] [1]: http://answall.com/questions/12540/como-passar-dados-de-uma-tabela-sqlite-para-diversos-campos-edittext

  • Emerson, here we don’t use [solved] in the title. I voted to close your question as duplicate since you say it solved the problem.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.