Answers for "is viewmodeproviers deprecated"

2

viewmodelproviders deprecated

JAVA
replace :
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel.class);

with:
customViewModel    = new ViewModelProvider(this).get(CustomViewModel.class);


KOTLIN
replace:
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel::class.java)

with:
customViewModel    = ViewModelProvider(this).get(CustomViewModel::class.java)
Posted by: Guest on May-07-2020
0

replace ViewModelProviders.of

JAVA
replace :
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel.class);

with:
customViewModel    = new ViewModelProvider(this).get(CustomViewModel.class);


KOTLIN
replace:
customViewModel    = ViewModelProviders.of(this).get(CustomViewModel::class.java)

with:
customViewModel    = ViewModelProvider(this).get(CustomViewModel::class.java)
Posted by: Guest on May-07-2020

Code answers related to "is viewmodeproviers deprecated"

Browse Popular Code Answers by Language