public class LabelViewModel extends BaseRepoViewModel<MainRepo>
Label
Modifier and Type | Field and Description |
---|---|
private androidx.lifecycle.MediatorLiveData<Label> |
label
Our Label
|
private androidx.lifecycle.MutableLiveData<java.lang.String> |
name
Our Label name
|
private java.lang.String |
originalName
Original name of our Label
|
mRepo, TAG
Constructor and Description |
---|
LabelViewModel(android.app.Application app,
Label aLabel) |
Modifier and Type | Method and Description |
---|---|
androidx.lifecycle.LiveData<Label> |
getLabel() |
androidx.lifecycle.MutableLiveData<java.lang.String> |
getName() |
java.lang.String |
getNameSync() |
java.lang.String |
getOriginalName() |
protected void |
initRepo() |
void |
resetName() |
void |
updateLabel() |
getErrorMsg, getInfoMessage, getIsWorking, onCleared, postErrorMsg, postInfoMessage, postIsWorking, setErrorMsg, setInfoMessage, setIsWorking
private final androidx.lifecycle.MediatorLiveData<Label> label
private final androidx.lifecycle.MutableLiveData<java.lang.String> name
private java.lang.String originalName
public LabelViewModel(@NonNull android.app.Application app, @NonNull Label aLabel)
protected void initRepo()
initRepo
in class BaseRepoViewModel<MainRepo>
public androidx.lifecycle.LiveData<Label> getLabel()
public androidx.lifecycle.MutableLiveData<java.lang.String> getName()
public java.lang.String getNameSync()
public java.lang.String getOriginalName()
public void updateLabel()
public void resetName()