mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-05-31 16:00:49 +00:00
Revert "共有ビューモデル実装"
This reverts commit 6d17811ada4a7dba85f403c3344417dc8b991e24.
This commit is contained in:
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…
x
Reference in New Issue
Block a user