Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

showing data in gridview from database

Does anyone know how to put the database entries into a gridview in android? Or is there a tutorial out there which explains how to do that.plz help me by giving complete example.

like image 434
jitendra Avatar asked Jul 15 '26 14:07

jitendra


2 Answers

You will need to use a CursorAdapter.

like image 183
Macarse Avatar answered Jul 17 '26 05:07

Macarse


  1. You need SQLiteOpenHelper for works (create, delete) with DB.

  2. You need ContentProvider for get data from DB and return it to adapter.

  3. You need CursorAdapter or SimpleCursorAdapter for fill cells of GridView.

like image 34
mysuperass Avatar answered Jul 17 '26 07:07

mysuperass



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!