sky
0
Q:

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)
3
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)
0

New to Communities?

Join the community