Saving Data on Android


LiveData  and  ViewModels



Download 19,28 Mb.
Pdf ko'rish
bet157/292
Sana24.01.2022
Hajmi19,28 Mb.
#407089
1   ...   153   154   155   156   157   158   159   160   ...   292
Bog'liq
Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019

LiveData
 and 
ViewModels
.
Saving Data on Android
Chapter 8: The DAO Pattern
raywenderlich.com
147


9
Chapter 9: Using Room with 
Google's Architecture 
Components
By Aldo Olivares
In the previous chapters, you learned how to create the most important components 
of a Room Database: your 
data access objects (DAOs)
 and your 
entities
.
While having your DAOs and entities is usually enough to interact with your 
database, you still need a way to display all the information to the user, all the while 
handling lifecycle of the app and configuration changes. This is where Google's 
architecture components such as the 
ViewModel
 and 
LiveData
 come to the rescue!
In this chapter, you will learn:
• What 
LiveData
 and 
ViewModel
 components are, and how to use them.
• How to make your DAOs return 
LiveData
s instead of simple data objects.
• How to create 
ViewModel
s that are 

Download 19,28 Mb.

Do'stlaringiz bilan baham:
1   ...   153   154   155   156   157   158   159   160   ...   292




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish