mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
parent
c3e1825542
commit
f7a71c70ed
|
@ -1,19 +0,0 @@
|
|||
package one.nem.lacerta.component.viewer;
|
||||
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
public class SharedViewModel extends ViewModel {
|
||||
|
||||
private final MutableLiveData<Integer> currentFragmentPosition = new MutableLiveData<>();
|
||||
|
||||
public void setCurrentFragmentPosition(int position) {
|
||||
currentFragmentPosition.setValue(position);
|
||||
}
|
||||
|
||||
public int getCurrentFragmentPosition() {
|
||||
assert currentFragmentPosition.getValue() != null;
|
||||
return currentFragmentPosition.getValue();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user