Last active
April 2, 2019 14:23
-
-
Save JoseAlcerreca/5dd62b2b5d2164696027d1724bfa57c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Don't do this | |
public class MyViewModel extends AndroidViewModel { | |
public final MutableLiveData<String> statusLabel = new MutableLiveData<>(); | |
public SampleViewModel(Application context) { | |
super(context); | |
statusLabel.setValue(context.getString(R.string.labelString)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Constructor and class name do not match. Can you update it. Thanks.