In the Receive assets screen change the layout to relative to get more controle over position

This commit is contained in:
dtvv 2018-10-25 09:54:42 -05:00
parent ae3ed3725d
commit b5bc9e88c7

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<android.support.constraint.ConstraintLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingBottom="24dp"> android:paddingBottom="24dp">
@ -18,11 +18,10 @@
android:layout_marginEnd="0dp" android:layout_marginEnd="0dp"
android:layout_marginStart="0dp" android:layout_marginStart="0dp"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
app:layout_constraintEnd_toEndOf="parent" android:layout_alignParentTop="true"/>
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView <TextView
android:id="@+id/txtTittle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
@ -31,89 +30,78 @@
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="20sp" android:textSize="20sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent" android:layout_alignParentTop="true" />
app:layout_constraintTop_toTopOf="parent" />
<cy.agorise.crystalwallet.util.CircularImageView <cy.agorise.crystalwallet.util.CircularImageView
android:id="@+id/gravatar" android:id="@+id/gravatar"
android:layout_width="60dp" android:layout_width="60dp"
android:layout_height="60dp" android:layout_height="60dp"
android:layout_below="@+id/txtTittle"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:layout_marginTop="90dp" android:layout_marginTop="30dp"
android:src="@drawable/avatar_placeholder" android:src="@drawable/avatar_placeholder" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Spinner <Spinner
android:id="@+id/spTo" android:id="@+id/spTo"
android:layout_width="0dp" android:layout_width="200dp"
android:layout_height="wrap_content" android:layout_height="50dp"
android:layout_marginEnd="24dp" android:layout_marginTop="30dp"
android:layout_marginStart="16dp" android:layout_below="@+id/txtTittle"
app:layout_constraintEnd_toEndOf="parent" android:layout_alignParentRight="true"
app:layout_constraintStart_toEndOf="@id/gravatar" android:layout_marginRight="20dp"/>
app:layout_constraintTop_toTopOf="@id/gravatar" />
<TextView <TextView
android:id="@+id/tvFromError" android:id="@+id/tvFromError"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/red" android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/spTo" android:layout_below="@+id/gravatar"
app:layout_constraintStart_toStartOf="@+id/spTo" android:layout_marginTop="10dp"/>
app:layout_constraintTop_toBottomOf="@+id/topView" />
<EditText <EditText
android:id="@+id/etAmount" android:id="@+id/etAmount"
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="24dp" android:layout_below="@+id/tvFromError"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:inputType="numberDecimal" android:layout_marginTop="10dp"
android:textSize="20sp"
android:hint="@string/amount" android:hint="@string/amount"
app:layout_constraintStart_toStartOf="parent" android:inputType="numberDecimal"
app:layout_constraintTop_toBottomOf="@+id/gravatar" /> android:textSize="20sp" />
<TextView <TextView
android:id="@+id/tvAmountError" android:id="@+id/tvAmountError"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/red" android:textColor="@color/red"
app:layout_constraintEnd_toEndOf="@+id/etAmount" android:layout_below="@+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="150dp" android:layout_width="150dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:layout_marginTop="8dp" android:layout_marginTop="25dp"
android:gravity="top" android:gravity="top"
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:layout_below="@+id/tvFromError"
android:textColor="@color/white" android:textColor="@color/white"
app:layout_constraintEnd_toEndOf="parent" android:layout_alignParentRight="true"
app:layout_constraintTop_toTopOf="@+id/etAmount" /> android:layout_marginRight="20dp"/>
<View <View
android:id="@+id/viewSpinner" android:id="@+id/viewSpinner"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="3dp" android:layout_height="3dp"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:background="@color/gray" 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:id="@+id/tvAssetError" android:id="@+id/tvAssetError"
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/red" android:textColor="@color/red"
app:layout_constraintBottom_toBottomOf="@+id/tvAmountError" android:layout_below="@+id/spAsset"/>
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset" />
<cy.agorise.crystalwallet.util.SquaredImageView <cy.agorise.crystalwallet.util.SquaredImageView
android:id="@+id/ivQrCode" android:id="@+id/ivQrCode"
@ -121,13 +109,12 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_marginTop="8dp" android:layout_marginTop="5dp"
android:adjustViewBounds="true" android:adjustViewBounds="true"
android:contentDescription="@string/qr_code" android:contentDescription="@string/qr_code"
android:src="@color/gray" android:src="@color/gray"
app:layout_constraintEnd_toEndOf="parent" android:layout_below="@+id/tvAmountError"
app:layout_constraintStart_toStartOf="parent" android:layout_centerHorizontal="true"/>
app:layout_constraintTop_toBottomOf="@+id/tvAmountError"/>
<TextView <TextView
android:id="@+id/tvShare" android:id="@+id/tvShare"
@ -139,20 +126,20 @@
android:text="@string/share_this_qr" android:text="@string/share_this_qr"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/ivQrCode" android:layout_below="@+id/ivQrCode" />
app:layout_constraintStart_toStartOf="parent"/>
<TextView <TextView
android:id="@+id/tvCancel" android:id="@+id/tvCancel"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:text="@string/close" android:text="@string/close"
android:textSize="18sp" android:textSize="18sp"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintTop_toTopOf="@id/tvShare" android:layout_below="@+id/ivQrCode"
app:layout_constraintEnd_toEndOf="parent" /> android:layout_alignParentRight="true"/>
</android.support.constraint.ConstraintLayout> </RelativeLayout>
</ScrollView> </ScrollView>