Skip to content

HassanMuawia01/RoomDatabase_liveData_CurdOperation

Repository files navigation

Topic: using room database do CRUD operation.

create an activity with 2 fragments.

  1. the activity should have a tab layout and at the bottom place an (Insert) button and an edit text. insert the text from the edit text on insert button click
  2. fragment 1 should have a recycler view and fetch all the data from DB and show it in the recycler view. on item click get the data from item position and send it to the edit text inside the activity and change the button text to Update. click update should update the current position data in DB.
  3. fragment 2 should have a recycler view and fetch all the data from DB and show it in the recycler view. on item click get the data from item position and delete it from the list and database as well

hint. Use room database with live data to update the UI automatically without refreshing the list manually after the crud operation.

WhatsApp.Video.2024-02-28.at.19.28.35_401436e0.mp4

Releases

No releases published

Packages

No packages published

Languages