mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-07 19:47:36 +00:00
1 file changed
-19
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user