From b7164ef2008b5bf6be3b4779f17cbe7676cdf52c Mon Sep 17 00:00:00 2001 From: m2049r Date: Wed, 20 Nov 2019 07:33:07 +0100 Subject: [PATCH] fix XMR missing in open wallet (#642) --- .../main/java/com/m2049r/xmrwallet/WalletFragment.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/WalletFragment.java b/app/src/main/java/com/m2049r/xmrwallet/WalletFragment.java index 8f11e9a..7e214d9 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/WalletFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/WalletFragment.java @@ -50,6 +50,7 @@ import com.m2049r.xmrwallet.widget.Toolbar; import java.text.NumberFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import timber.log.Timber; @@ -112,9 +113,12 @@ public class WalletFragment extends Fragment ivSynced = view.findViewById(R.id.ivSynced); sCurrency = view.findViewById(R.id.sCurrency); - ArrayAdapter currencyAdapter = ArrayAdapter.createFromResource(getContext(), R.array.currency, R.layout.item_spinner_balance); - currencyAdapter.setDropDownViewResource(R.layout.item_spinner_dropdown_item); - sCurrency.setAdapter(currencyAdapter); + List currencies = new ArrayList<>(); + currencies.add(Helper.BASE_CRYPTO); + currencies.addAll(Arrays.asList(getResources().getStringArray(R.array.currency))); + ArrayAdapter spinnerAdapter = new ArrayAdapter<>(getContext(), R.layout.item_spinner_balance, currencies); + spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + sCurrency.setAdapter(spinnerAdapter); bSend = view.findViewById(R.id.bSend); bReceive = view.findViewById(R.id.bReceive);