package Ġcom . tech p ali yal . android kotlin mv vm . ui . view _ model Ċ Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . tech p ali yal . android kotlin mv vm . model . User Model ĊĊ Ċ /** Ċ Ġ* Ġ@ author ĠYo ge sh ĠP ali yal Ċ Ġ* Ġyo ge shp ali yal . fo ss @ gmail . com Ċ Ġ* Ġhttps :// tech p ali yal . com Ċ Ġ* Ġhttps :// yo ge shp ali yal . com Ċ Ġ* ĠCreated ĠDate Ġ: Ġ 9 ĠJanuary Ġ 2 0 2 0 Ċ Ġ*/ Ċ class ĠUser Listing Activity ViewModel Ġ: ĠViewModel () Ġ{ ĊĊĠĠĠ Ġval Ġdata Ġ= ĠMutable LiveData < List < User Model >>() ĊĊĊĊĠĠĠ Ġfun ĠsetData (){ ĊĠĠĠĠĠĠĠ Ġval Ġtemp Arr Ġ= ĠArrayList < User Model >() ĊĠĠĠĠĠĠĠ Ġtemp Arr . add ( User Model ( name Ġ= Ġ" Yo ge sh ", image Ġ= Ġ" https :// random user . me / api / por traits / men / 5 2 . jpg ", Ġaddress Ġ= Ġ" J od hp ur ")) ĊĠĠĠĠĠĠĠ Ġtemp Arr . add ( User Model ( name Ġ= Ġ" U mesh ", image Ġ= Ġ" https :// random user . me / api / por traits / men / 6 2 . jpg ")) ĊĠĠĠĠĠĠĠ Ġtemp Arr . add ( User Model ( name Ġ= Ġ" So han ", image Ġ= Ġ" https :// random user . me / api / por traits / men / 8 4 . jpg ")) ĊĠĠĠĠĠĠĠ Ġtemp Arr . add ( User Model ( name Ġ= Ġ" Mad an ", image Ġ= Ġ" https :// random user . me / api / por traits / men / 8 3 . jpg ")) ĊĠĠĠĠĠĠĠ Ġdata . value Ġ= Ġtemp Arr ĊĠĠĠ Ġ} Ċ Ċ }