Modified ReceiveTransactionFrag layout to comply with requirements

This commit is contained in:
Severiano Jaramillo 2017-12-06 22:55:58 -06:00
parent bbd0cdcfda
commit 4f4100d16e
6 changed files with 156 additions and 18 deletions

View file

@ -7,6 +7,7 @@ import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.DialogFragment; import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
@ -15,6 +16,7 @@ import android.text.Editable;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.Spinner; import android.widget.Spinner;
@ -64,8 +66,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
EditText etMemo; EditText etMemo;
@BindView(R.id.tvMemoError) @BindView(R.id.tvMemoError)
TextView tvMemoError; TextView tvMemoError;
//@BindView(R.id.btnSend) @BindView(R.id.btnSend)
Button btnSend; FloatingActionButton btnSend;
@BindView(R.id.btnCancel) @BindView(R.id.btnCancel)
TextView btnCancel; TextView btnCancel;

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="0"
android:startColor="@color/receive_light_green"
android:endColor="@color/receive_strong_green"/>
</shape>

View file

@ -1,33 +1,155 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:minWidth="350dp">
android:weightSum="1">
<View
android:id="@+id/topView"
android:layout_width="match_parent"
android:background="@drawable/receive_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_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/receive_assets"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<cy.agorise.crystalwallet.util.CircularImageView
android:id="@+id/gravatar"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@drawable/ken_code_gravatar"
android:layout_marginStart="32dp"
android:layout_marginTop="90dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Spinner
android:id="@+id/spTo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginStart="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/gravatar"
app:layout_constraintTop_toTopOf="@id/gravatar" />
<TextView
android:id="@+id/tvFromError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/spTo"
app:layout_constraintStart_toStartOf="@+id/spTo"
app:layout_constraintTop_toBottomOf="@+id/topView" />
<EditText <EditText
android:id="@+id/etAmount" android:id="@+id/etAmount"
android:layout_width="wrap_content" android:layout_width="150dp"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="24dp"
android:inputType="textMultiLine"
android:textColor="@color/white"
android:textSize="20sp"
android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/gravatar" />
<TextView <TextView
android:id="@+id/tvAmountError" android:id="@+id/tvAmountError"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" /> 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 <Spinner
android:id="@+id/spAsset" android:id="@+id/spAsset"
android:layout_width="match_parent" android:layout_width="150dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="24dp"
android:layout_marginTop="8dp"
android:gravity="top" android:gravity="top"
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:textColor="@color/white" /> 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="3dp"
android:layout_marginTop="5dp"
android:background="@color/gray"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset"
app:layout_constraintTop_toBottomOf="@id/spAsset" />
<TextView <TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/tvAssetError" android:id="@+id/tvAssetError"
android:textColor="@color/red" /> 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" />
<ImageView <ImageView
android:id="@+id/ivQrCode" android:id="@+id/ivQrCode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="300dp"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:layout_marginTop="8dp"
android:adjustViewBounds="true"
android:src="@color/gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAmountError" />
<TextView
android:id="@+id/tvShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:adjustViewBounds="true"/> android:layout_marginBottom="24dp"
</LinearLayout> android:layout_marginStart="24dp"
android:layout_marginTop="24dp"
android:text="@string/share_this_qr"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivQrCode" />
<TextView
android:id="@+id/tvCancel"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:text="@string/receive_close"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</android.support.constraint.ConstraintLayout>

View file

@ -217,7 +217,7 @@
app:layout_constraintTop_toTopOf="@id/ivCamera" /> app:layout_constraintTop_toTopOf="@id/ivCamera" />
<android.support.design.widget.FloatingActionButton <android.support.design.widget.FloatingActionButton
android:id="@+id/fabSend" android:id="@+id/btnSend"
android:layout_width="90dp" android:layout_width="90dp"
android:layout_height="90dp" android:layout_height="90dp"
android:layout_marginTop="24dp" android:layout_marginTop="24dp"

View file

@ -41,4 +41,6 @@
<color name="QRCodeWhiteColor">#ffffff</color> <color name="QRCodeWhiteColor">#ffffff</color>
<color name="send_strong_orange">#FF7063</color> <color name="send_strong_orange">#FF7063</color>
<color name="send_light_orange">#FF9269</color> <color name="send_light_orange">#FF9269</color>
<color name="receive_light_green">#52CE84</color>
<color name="receive_strong_green">#4EBB7F</color>
</resources> </resources>

View file

@ -455,4 +455,7 @@
<string name="scan_capital">Scan a QR or NFC signal</string> <string name="scan_capital">Scan a QR or NFC signal</string>
<string name="cancel_capital">CANCEL</string> <string name="cancel_capital">CANCEL</string>
<string name="title_capital">Send Assets</string> <string name="title_capital">Send Assets</string>
<string name="receive_assets">Receive Assets</string>
<string name="share_this_qr">Share this QR</string>
<string name="receive_close">CLOSE</string>
</resources> </resources>