Angel Pat Martin
Angel Pat Martin

Reputation: 97

Content Resolver SQLite refresh data after operation

My problem is that I do content resolver operations (CRUD) and my local Sqlite data base gets the changes but they do not show/refresh those changes in my TEXTVIEW, in here I'm not talking about refreshing a listview/recyclerview with adapters like 100% of the questions in here I'm just talking about a simple text view which fetch information from the local database so in here I'm not using adapters or recycler views (not yet). I've tried:

How do I know my CRUD ops are working? if I restart my app the changes are there. Any help in the rigth directions will be appreciated thanks.

Upvotes: 0

Views: 112

Answers (1)

Massita
Massita

Reputation: 309

Any change on your database is reflected only on your database. If you need to update a text view after the change, you need to handle that the change have been made and update your view. An alternative to update your view and data after persisting it to a database is using the LiveData or any observable.

Upvotes: 1

Related Questions