Fixed spinner view in transaction window

This commit is contained in:
dtvv 2018-09-12 21:34:27 -05:00
parent a7ba6f5c6b
commit 83b7a7d3d3
4 changed files with 29 additions and 9 deletions

View file

@ -145,6 +145,11 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
this.cryptoNetAccountId = getArguments().getLong("CRYPTO_NET_ACCOUNT_ID",-1); 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) { if (this.cryptoNetAccountId != -1) {
db = CrystalDatabase.getAppDatabase(this.getContext()); db = CrystalDatabase.getAppDatabase(this.getContext());
this.cryptoNetAccount = db.cryptoNetAccountDao().getById(this.cryptoNetAccountId); 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 is only for graphene accounts.
* *
**/ **/
//this.grapheneAccount = new GrapheneAccount(this.cryptoNetAccount); this.grapheneAccount = new GrapheneAccount(this.cryptoNetAccount);
//this.grapheneAccount.loadInfo(db.grapheneAccountInfoDao().getByAccountId(this.cryptoNetAccountId)); this.grapheneAccount.loadInfo(db.grapheneAccountInfoDao().getByAccountId(this.cryptoNetAccountId));
final LiveData<List<CryptoCoinBalance>> balancesList = db.cryptoCoinBalanceDao().getBalancesFromAccount(cryptoNetAccountId); final LiveData<List<CryptoCoinBalance>> balancesList = db.cryptoCoinBalanceDao().getBalancesFromAccount(cryptoNetAccountId);
balancesList.observe(this, new Observer<List<CryptoCoinBalance>>() { balancesList.observe(this, new Observer<List<CryptoCoinBalance>>() {
@ -178,7 +183,7 @@ 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);
//spFrom.setAdapter(fromSpinnerAdapter); spFrom.setAdapter(fromSpinnerAdapter);
//spFrom.setSelection(0); //spFrom.setSelection(0);
/* /*

View file

@ -31,7 +31,7 @@ public class BitsharesAccountMnemonicValidationField extends ValidationField {
this.startValidating(); this.startValidating();
final ValidationField field = this; final ValidationField field = this;
final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(newAccountNameValue,newMnemonicValue); final ValidateImportBitsharesAccountRequest request = new ValidateImportBitsharesAccountRequest(newAccountNameValue,newMnemonicValue,null);
request.setListener(new CryptoNetInfoRequestListener() { request.setListener(new CryptoNetInfoRequestListener() {
@Override @Override
public void onCarryOut() { public void onCarryOut() {

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="5dp"
android:topRightRadius="5dp"
android:bottomRightRadius="5dp"
android:bottomLeftRadius="5dp" />
<stroke
android:width="1dp"
android:color="@color/transparent" />
<solid android:color="@color/transparent" />
</shape>

View file

@ -46,12 +46,13 @@
<com.jaredrummler.materialspinner.MaterialSpinner <com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/spFrom" android:id="@+id/spFrom"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="40dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/gravatar" app:layout_constraintStart_toEndOf="@id/gravatar"
app:layout_constraintTop_toTopOf="@id/gravatar" /> app:layout_constraintBottom_toBottomOf="@+id/topView"/>
<TextView <TextView
android:id="@+id/tvFromError" android:id="@+id/tvFromError"
@ -221,11 +222,10 @@
android:id="@+id/btnSend" android:id="@+id/btnSend"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="90dp" android:layout_height="90dp"
android:layout_marginTop="24dp"
app:backgroundTint="@color/send_strong_orange" app:backgroundTint="@color/send_strong_orange"
app:srcCompat="@drawable/ic_arrow_forward"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/viewSend" /> app:srcCompat="@drawable/ic_arrow_forward"
tools:layout_editor_absoluteY="471dp" />
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"