October 3, 2020
  • 5:49 am Cách cài Win từ ổ cứng: cả Win 7/8/8.1 và Win10 (làm mẫu với Win 10)
  • 2:47 am [Topgame] Top 9 game bắn súng online miễn phí hay nhất đầu 2018 | Android-IOS
  • 8:03 pm Hướng dẫn tạo chú thích footnote trong Word | How to Insert Footnote in Word
  • 7:26 am Cách chèn nhạc vào ảnh và video trên Facebook
  • 6:59 am Tóm Tắt The Walking Dead (Xác Sống) | Season 4

We are going to create a Book Library application. Our application will have all the necessary functionality which every app with database should have. That includes CRUD, or Create, Read, Update and Delete functions. Also I’m going to teach you how to add Recyclerview and display data from our SQLite database in it. We are going to add some animations as well.

Project Files:

Part 1 (Create Database Schema) –
Part 2 (Insert Data in Database Table) –
Part 3 (Display Data in Recyclerview) –
Part 5 (Delete Table Data) –
Part 6 (Animate Recyclerview) –

One of the main principles of SQL databases is the schema: a formal declaration of how the database is organized. The schema is reflected in the SQL statements that you use to create your database. You may find it helpful to create a companion class, known as a contract class, which explicitly specifies the layout of your schema in a systematic and self-documenting way.

A contract class is a container for constants that define names for URIs, tables, and columns. The contract class allows you to use the same constants across all the other classes in the same package. This lets you change a column name in one place and have it propagate throughout your code.

🏆 My Courses:


💎 My Google Play Store:

💡 My Portfolio:

Nguồn: https://chaoticpharmacology.com/

Xem thêm bài viết khác: https://chaoticpharmacology.com/cong-nghe/




  1. Ziko Isaac Posted on July 11, 2020 at 4:45 pm

    lol you skipped a whole part you added in the code…

  2. Shiro Posted on July 11, 2020 at 4:45 pm

    I have a fragment that has the RecylerView. How would you pass the id you get from the fragment the RecylerView is in to another fragment?

  3. Habibur Rahman Posted on July 11, 2020 at 4:45 pm

    very helpful and well explained

  4. Al-Sharaby Al-Faishy Posted on July 11, 2020 at 4:45 pm

    I did everything as explained, just couldn't figure out why the strings such as "title", "author", "pages" has green underline, the app crash when when I click on the item name for the screen that recall the details of the item for update/delete?? any ideas folks.

  5. Mazen B Posted on July 11, 2020 at 4:45 pm

    Hi Stevdza,
    Thanx a lot for your awesome, short, fast, clear and useful tutorials,.
    Keep it up!

    However @1:31 on MyViewHolder inner class I have used ConstraintLayout for mainLayout instead of LinearLayout as it was the reason why my app crashes whenever I start the app while any data are available on the database.

    Also, on 10:41 on UpdateActivity you add 3 rows of code after
    MyDataBaseHelper db.. as following :
    title = title_input.getText().toString().trim();

    author = author_input.getText().toString().trim();

    pages = pages_input.getText().toString().trim();

    this code is add but not mentioned.

    Also, activity_update.xml <androidx.constraintlayout.widget…. should have tools:context=".UpdateActivity"

  6. Tanmoy Ghosh Posted on July 11, 2020 at 4:45 pm

    At 2:11 when i am going to start the new intent it is showing me an error in calling the intent…please help sir

  7. Mohsen Mashkour Posted on July 11, 2020 at 4:45 pm

    I have done everything but when i press the update button i just see the toast message and nothing is changed in the main activity.

  8. Alex Newcomer Posted on July 11, 2020 at 4:45 pm

    At 11:47 onBindViewHolder method is shown and it has been changed since the last time we saw it with the override on click removed and nowhere to be seen. I try to recreate the code you show on the screen and get errors. And when I run my program the values don't show as updated please advise. Thanks.

  9. Jason Shin Posted on July 11, 2020 at 4:45 pm

    10:42 While I watched and went through several times, I struggled with getText() functions, it was so fast to disappear on the screen so that, I thought there was another synchronizing method somehow 😂 Just letting you know.

  10. Fun Zone Posted on July 11, 2020 at 4:45 pm

    Search option and alphabet a- z list view . Long click to edit data and onclick open Next activity and show details with title , author/description and number .
    Then user can easily able to access .data

  11. bvtujo Posted on July 11, 2020 at 4:45 pm

    make a google maps api tutorial please!