From 83b7a7d3d3b3b8f6a48ce1178fe3aacbdc5e3009 Mon Sep 17 00:00:00 2001 From: dtvv Date: Wed, 12 Sep 2018 21:34:27 -0500 Subject: [PATCH] Fixed spinner view in transaction window --- .../fragments/SendTransactionFragment.java | 11 ++++++++--- .../BitsharesAccountMnemonicValidationField.java | 2 +- app/src/main/res/drawable-xhdpi/square_color.xml | 15 +++++++++++++++ app/src/main/res/layout/send_transaction.xml | 10 +++++----- 4 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 app/src/main/res/drawable-xhdpi/square_color.xml diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java index 05bfcfe..6b87b37 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java @@ -145,6 +145,11 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat this.cryptoNetAccountId = getArguments().getLong("CRYPTO_NET_ACCOUNT_ID",-1); + /* + * Add style to the spinner android + * */ + spFrom.setBackground(getContext().getDrawable(R.drawable.square_color)); + if (this.cryptoNetAccountId != -1) { db = CrystalDatabase.getAppDatabase(this.getContext()); this.cryptoNetAccount = db.cryptoNetAccountDao().getById(this.cryptoNetAccountId); @@ -153,8 +158,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat * this is only for graphene accounts. * **/ - //this.grapheneAccount = new GrapheneAccount(this.cryptoNetAccount); - //this.grapheneAccount.loadInfo(db.grapheneAccountInfoDao().getByAccountId(this.cryptoNetAccountId)); + this.grapheneAccount = new GrapheneAccount(this.cryptoNetAccount); + this.grapheneAccount.loadInfo(db.grapheneAccountInfoDao().getByAccountId(this.cryptoNetAccountId)); final LiveData> balancesList = db.cryptoCoinBalanceDao().getBalancesFromAccount(cryptoNetAccountId); balancesList.observe(this, new Observer>() { @@ -178,7 +183,7 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat List cryptoNetAccounts = cryptoNetAccountListViewModel.getCryptoNetAccountList(); CryptoNetAccountAdapter fromSpinnerAdapter = new CryptoNetAccountAdapter(this.getContext(), android.R.layout.simple_spinner_item, cryptoNetAccounts); - //spFrom.setAdapter(fromSpinnerAdapter); + spFrom.setAdapter(fromSpinnerAdapter); //spFrom.setSelection(0); /* diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/BitsharesAccountMnemonicValidationField.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/BitsharesAccountMnemonicValidationField.java index cbbbe72..d750fd5 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/BitsharesAccountMnemonicValidationField.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/BitsharesAccountMnemonicValidationField.java @@ -31,7 +31,7 @@ public class BitsharesAccountMnemonicValidationField extends ValidationField { this.startValidating(); final ValidationField field = this; - final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(newAccountNameValue,newMnemonicValue); + final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(newAccountNameValue,newMnemonicValue,null); request.setListener(new CryptoNetInfoRequestListener() { @Override public void onCarryOut() { diff --git a/app/src/main/res/drawable-xhdpi/square_color.xml b/app/src/main/res/drawable-xhdpi/square_color.xml new file mode 100644 index 0000000..6a2990e --- /dev/null +++ b/app/src/main/res/drawable-xhdpi/square_color.xml @@ -0,0 +1,15 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/send_transaction.xml b/app/src/main/res/layout/send_transaction.xml index b691589..49794d1 100644 --- a/app/src/main/res/layout/send_transaction.xml +++ b/app/src/main/res/layout/send_transaction.xml @@ -46,12 +46,13 @@ + app:layout_constraintBottom_toBottomOf="@+id/topView"/> + app:srcCompat="@drawable/ic_arrow_forward" + tools:layout_editor_absoluteY="471dp" />