Android SQlite Database using RecyclerView to load database android|android tut

Android tut · 70K views · 2016 · 19:42

Open on YouTube

Software (other)Testing, debugging & developer toolstutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when someone needs a worked example of reading SQLite data and displaying it in an Android RecyclerView.

Recommended by 3 people across 3 different months, 2017 to 2019.

What it is

A roughly 20-minute Android tutorial from the channel Android tut showing how to build a SQLite database helper class and load its rows into a RecyclerView with custom CardView list items. It walks through the SQLite handling classes and the adapter needed to display the data.

What people said

Recommends newActivity21 · 2017-10 · Stack Overflow · on “How to use RecylerView with Database?”

Your help is indispensable. Thank you very much for the suggestions, thanks to which I was able to view the RecyclerView view retrieving data from the database. If someone hits a similar problem, I post a link to a tutorial on YT, which also helped me a lot. link [this video]

Recommends Prince Persia · 2019-03 · Stack Overflow · on “How to store data to external sqlite database and display in RecyclerView”

I figured it out and it works perfectly. This [this video] video helped me. I just followed his way of adding books to the list. I created a function in my DatabaseAccess class and just accessed it in the Required Activity. This is the function. public ArrayList<book> getdetails(String query, String category) { ArrayList<book> list = new ArrayList<book>(); String[] where= new String[]{category}; Cursor cursor = database.rawQuery(query, where); if (cursor!=null) { if (cursor.moveToFirst()) { do { book Book = new book(); Book.setTitle(cursor.getString(1)); Book.setAuthor(cursor.getString(6)); Book.setImage(cursor.getBlob(2)); Book.setPublisher(cursor.getString(3)); Book.setPublish_date(cursor.getSt

Recommends user10222681 · 2019-05 · Stack Overflow · on “Increase Column in Table Layout Android Studio”

For data in Sqlite database you need to create a database helper class, and after that you will also need an Adapter for your recyclerview (to display them), you can find a full tutorial here: [this video]