+ this.currencies = new MutableLiveData<>(new ArrayList<>());
+ }
+ public void showPositionAndPadding() {
+ positionAndPaddingVisible.postValue(true);
+ }
+ public void hidePositionAndPadding() {
+ positionAndPaddingVisible.postValue(false);
+ }
+ public void observePositionAndPaddingVisible(LifecycleOwner activity,
+ Observer<Boolean> observer) {
+ positionAndPaddingVisible.observe(activity, observer);
+ }
+ void setOnCurrencySelectedListener(OnCurrencySelectedListener listener) {
+ selectionListener = listener;
+ }
+ void resetOnCurrencySelectedListener() {
+ selectionListener = null;
+ }
+ void triggerOnCurrencySelectedListener(Currency c) {
+ if (selectionListener != null)
+ selectionListener.onCurrencySelected(c);