Back to previous version of the send transaction button

This commit is contained in:
dtvv 2018-09-24 15:06:39 -05:00
parent 3e5e0001e1
commit 2c5661c587
2 changed files with 243 additions and 259 deletions

View file

@ -97,8 +97,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
Spinner spAsset; Spinner spAsset;
@BindView(R.id.tvAssetError) @BindView(R.id.tvAssetError)
TextView tvAssetError; TextView tvAssetError;
@BindView(R.id.scrollMain) //@BindView(R.id.scrollMain)
ScrollView scrollMain; //ScrollView scrollMain;
@BindView(R.id.etAmount) @BindView(R.id.etAmount)
EditText etAmount; EditText etAmount;
@BindView(R.id.tvAmountError) @BindView(R.id.tvAmountError)
@ -167,7 +167,7 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
/* /*
* Detet scroll changes * Detet scroll changes
* */ * */
scrollMain.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() { /*scrollMain.getViewTreeObserver().addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {
@Override @Override
public void onScrollChanged() { public void onScrollChanged() {
@ -206,7 +206,7 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
viewSend.animate().y(600); viewSend.animate().y(600);
} }
} }
}); });*/
this.cryptoNetAccountId = getArguments().getLong("CRYPTO_NET_ACCOUNT_ID",-1); this.cryptoNetAccountId = getArguments().getLong("CRYPTO_NET_ACCOUNT_ID",-1);

View file

@ -1,271 +1,255 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <ScrollView
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:theme="@style/ActivityDialog"> android:background="@color/white">
<android.support.constraint.ConstraintLayout
<ScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:paddingBottom="24dp">
android:background="@color/white"
android:id="@+id/scrollMain">
<android.support.constraint.ConstraintLayout <View
android:id="@+id/topView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:background="@drawable/send_transaction_top_view"
android:layout_height="120dp"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:layout_marginTop="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="24dp"> android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/title_capital"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View <cy.agorise.crystalwallet.util.CircularImageView
android:id="@+id/topView" android:id="@+id/gravatar"
android:layout_width="match_parent" android:layout_width="60dp"
android:layout_height="119dp" android:layout_height="60dp"
android:background="@drawable/send_transaction_top_view" android:layout_marginStart="32dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="90dp"
app:layout_constraintHorizontal_bias="0.0" android:src="@drawable/avatar_placeholder"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/spFrom"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginEnd="24dp"
android:layout_marginStart="16dp"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/gravatar"
app:layout_constraintBottom_toBottomOf="@+id/topView"/>
<TextView
android:id="@+id/tvFromError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/spFrom"
app:layout_constraintStart_toStartOf="@+id/spFrom"
app:layout_constraintTop_toBottomOf="@+id/topView" />
<EditText
android:id="@+id/etTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:gravity="top"
android:inputType="text"
android:textSize="20sp"
android:hint="@string/to_capital"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/gravatar" />
<ImageView
android:id="@+id/ivPeople"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="5dp"
app:srcCompat="@drawable/ic_people"
android:layout_marginBottom="15dp"
app:layout_constraintEnd_toEndOf="@id/etTo"
app:layout_constraintBottom_toBottomOf="@id/etTo"
android:contentDescription="@string/people_icon" />
<TextView
android:id="@+id/tvToError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etTo"
app:layout_constraintStart_toStartOf="@+id/etTo"
app:layout_constraintTop_toBottomOf="@+id/etTo" />
<EditText
android:id="@+id/etAmount"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="24dp"
android:inputType="numberDecimal"
android:textSize="20sp"
android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvToError" />
<TextView
android:id="@+id/tvAmountError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etAmount"
app:layout_constraintStart_toStartOf="@+id/etAmount"
app:layout_constraintTop_toBottomOf="@+id/etAmount" />
<Spinner
android:id="@+id/spAsset"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:gravity="top"
android:inputType="textMultiLine"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/etAmount" />
<View
android:id="@+id/viewSpinner"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginBottom="7dp"
android:background="@color/darkGray"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset"
app:layout_constraintBottom_toBottomOf="@id/etAmount" />
<TextView
android:id="@+id/tvAssetError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintBottom_toBottomOf="@+id/tvAmountError"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset" />
<EditText
android:id="@+id/etMemo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:inputType="textMultiLine"
android:hint="@string/memo_capital"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
<TextView
android:id="@+id/tvMemoError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etMemo"
app:layout_constraintStart_toStartOf="@+id/etMemo"
app:layout_constraintTop_toBottomOf="@+id/etMemo" />
<TextView
android:id="@+id/tvScan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="24dp"
android:text="@string/scan_capital"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMemoError" />
<ImageView
android:id="@+id/ivCamera"
android:layout_width="180dp"
android:layout_height="180dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:src="#666"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvScan"
android:contentDescription="@string/camera_feed_to_scan_qr" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabCloseCamera"
android:layout_width="30dp"
android:layout_height="30dp"
app:fabSize="mini"
android:layout_marginBottom="165dp"
android:layout_marginStart="165dp"
app:backgroundTint="@color/send_strong_orange"
app:srcCompat="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="@+id/ivCamera"
app:layout_constraintStart_toStartOf="@+id/ivCamera" />
<View
android:id="@+id/viewSend"
android:layout_width="120dp"
android:layout_height="140dp"
android:layout_marginEnd="0dp"
android:background="@drawable/send_transaction_send_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/ivCamera" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btnSend"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginTop="24dp"
app:backgroundTint="@color/send_strong_orange"
app:srcCompat="@drawable/ic_arrow_forward"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/viewSend" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="600dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:padding="5dp">
<TextView <TextView
android:layout_width="wrap_content" android:id="@+id/btnCancel"
android:layout_height="wrap_content" android:layout_width="20dp"
android:layout_marginStart="24dp" android:layout_height="26dp"
android:layout_marginTop="24dp" android:background="@drawable/ic_close"
android:text="@string/title_capital" android:text=""
android:textColor="@color/white" android:textSize="18sp"
android:textSize="20sp" android:textStyle="bold" />
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<cy.agorise.crystalwallet.util.CircularImageView </LinearLayout>
android:id="@+id/gravatar"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_marginStart="32dp"
android:layout_marginTop="90dp"
android:src="@drawable/avatar_placeholder"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.jaredrummler.materialspinner.MaterialSpinner </android.support.constraint.ConstraintLayout>
android:id="@+id/spFrom"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginEnd="24dp"
android:layout_marginStart="16dp"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/gravatar"
app:layout_constraintBottom_toBottomOf="@+id/topView"/>
<TextView </ScrollView>
android:id="@+id/tvFromError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/spFrom"
app:layout_constraintStart_toStartOf="@+id/spFrom"
app:layout_constraintTop_toBottomOf="@+id/topView" />
<EditText
android:id="@+id/etTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:gravity="top"
android:inputType="text"
android:textSize="20sp"
android:hint="@string/to_capital"
android:maxLength="255"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/gravatar" />
<ImageView
android:id="@+id/ivPeople"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_marginEnd="5dp"
app:srcCompat="@drawable/ic_people"
android:layout_marginBottom="15dp"
app:layout_constraintEnd_toEndOf="@id/etTo"
app:layout_constraintBottom_toBottomOf="@id/etTo"
android:contentDescription="@string/people_icon" />
<TextView
android:id="@+id/tvToError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etTo"
app:layout_constraintStart_toStartOf="@+id/etTo"
app:layout_constraintTop_toBottomOf="@+id/etTo" />
<EditText
android:id="@+id/etAmount"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginStart="24dp"
android:inputType="numberDecimal"
android:textSize="20sp"
android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvToError" />
<TextView
android:id="@+id/tvAmountError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etAmount"
app:layout_constraintStart_toStartOf="@+id/etAmount"
app:layout_constraintTop_toBottomOf="@+id/etAmount" />
<Spinner
android:id="@+id/spAsset"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:gravity="top"
android:inputType="textMultiLine"
android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/etAmount" />
<View
android:id="@+id/viewSpinner"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginBottom="7dp"
android:background="@color/darkGray"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset"
app:layout_constraintBottom_toBottomOf="@id/etAmount" />
<TextView
android:id="@+id/tvAssetError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintBottom_toBottomOf="@+id/tvAmountError"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset" />
<EditText
android:id="@+id/etMemo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:inputType="textMultiLine"
android:hint="@string/memo_capital"
android:textSize="20sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
<TextView
android:id="@+id/tvMemoError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etMemo"
app:layout_constraintStart_toStartOf="@+id/etMemo"
app:layout_constraintTop_toBottomOf="@+id/etMemo" />
<TextView
android:id="@+id/tvScan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginStart="24dp"
android:text="@string/scan_capital"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvMemoError" />
<me.dm7.barcodescanner.zxing.ZXingScannerView
android:id="@+id/ivCamera"
android:layout_width="180dp"
android:layout_height="180dp"
android:layout_marginBottom="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:src="#666"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvScan"
android:contentDescription="@string/camera_feed_to_scan_qr" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fabCloseCamera"
android:layout_width="30dp"
android:layout_height="30dp"
app:fabSize="mini"
android:layout_marginBottom="165dp"
android:layout_marginStart="165dp"
app:backgroundTint="@color/send_strong_orange"
app:srcCompat="@drawable/ic_close"
app:layout_constraintBottom_toBottomOf="@+id/ivCamera"
app:layout_constraintStart_toStartOf="@+id/ivCamera" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="600dp"
android:layout_marginEnd="24dp"
android:layout_marginTop="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:padding="5dp">
<TextView
android:id="@+id/btnCancel"
android:layout_width="20dp"
android:layout_height="26dp"
android:background="@drawable/ic_close"
android:text=""
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
</ScrollView>
<View
android:id="@+id/viewSend"
android:layout_width="120dp"
android:layout_height="140dp"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_marginTop="400dp"
android:background="@drawable/send_transaction_send_view" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/btnSend"
android:layout_width="90dp"
android:scaleX="1.7"
android:scaleY="1.7"
app:fabSize="normal"
android:layout_height="90dp"
android:layout_alignParentEnd="true"
android:layout_alignParentTop="true"
android:layout_marginRight="30dp"
android:layout_marginTop="441dp"
android:scaleType="center"
app:backgroundTint="@color/send_strong_orange"
app:srcCompat="@drawable/ic_arrow_forward"/>
</RelativeLayout>