Hello, tell me, please, how can the data be removed in the gridview. I take the data from the base like this:

mDbHelper = new SqlDB(this); SQLiteDatabase db2 = mDbHelper.getReadableDatabase(); Cursor Cursor1 = db2.rawQuery("select * from schet;", null); startManagingCursor(Cursor1); 
  • I looked through the entire Internet, I can’t find how the data can be displayed. My task is to display data from the database, select it and, if necessary, edit the record, maybe there are people who will help. - Fedor

1 answer 1

Something like this:

 // ... SimpleCursorAdapter adapter = new SimpleCursorAdapter( this, R.layout.some, Cursor1, new String[] {"string", ...}, new int[] {"id", ...} ); adapter.setViewBinder(new SomeBinder()); gridview.setAdapter(adapter);