If there is only one account in the screen of send assets that the spinner stay Blocked

This commit is contained in:
dtvv 2018-10-12 12:15:42 -05:00
parent 3019cc8422
commit 2e13b16a71

View file

@ -265,6 +265,13 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
List<CryptoNetAccount> cryptoNetAccounts = cryptoNetAccountListViewModel.getCryptoNetAccountList(); List<CryptoNetAccount> cryptoNetAccounts = cryptoNetAccountListViewModel.getCryptoNetAccountList();
CryptoNetAccountAdapter fromSpinnerAdapter = new CryptoNetAccountAdapter(this.getContext(), android.R.layout.simple_spinner_item, cryptoNetAccounts); CryptoNetAccountAdapter fromSpinnerAdapter = new CryptoNetAccountAdapter(this.getContext(), android.R.layout.simple_spinner_item, cryptoNetAccounts);
/*
* If only one account block the control
* */
if(cryptoNetAccounts.size()==1){
spFrom.setEnabled(false);
}
spFrom.setAdapter(fromSpinnerAdapter); spFrom.setAdapter(fromSpinnerAdapter);
//spFrom.setSelection(0); //spFrom.setSelection(0);