Rework layout, move amount field above address field

This commit is contained in:
pokkst 2023-01-17 22:12:18 -06:00
parent 3f9ceffdde
commit 8dace455d6
No known key found for this signature in database
GPG Key ID: 90C2ED85E67A50FF
2 changed files with 66 additions and 75 deletions

View File

@ -4,12 +4,10 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oled_dialogBackgroundColor"
android:fitsSystemWindows="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- CREATE LAYOUT -->
<TextView
android:id="@+id/send_monero_textview"
android:layout_width="match_parent"
@ -20,10 +18,11 @@
android:layout_marginStart="24dp"
android:textSize="32sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/selected_utxos_value_textview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- CREATE LAYOUT -->
<TextView
android:id="@+id/selected_utxos_value_textview"
android:layout_width="match_parent"
@ -31,83 +30,22 @@
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
android:text="@string/selected_utxos_value"
android:textSize="16sp"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/address_edittext"
android:textSize="14sp"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/send_monero_textview" />
<EditText
android:id="@+id/address_edittext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="4dp"
android:background="@drawable/edittext_bg"
android:layout_marginStart="24dp"
android:ellipsize="middle"
android:hint="@string/address"
android:singleLine="true"
app:layout_constraintBottom_toTopOf="@id/donate_label_textview"
app:layout_constraintEnd_toStartOf="@id/paste_address_imagebutton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/selected_utxos_value_textview"
tools:visibility="visible" />
<TextView
android:id="@+id/donate_label_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label"
android:layout_marginStart="24dp"
android:layout_marginBottom="16dp"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_edittext"
app:layout_constraintBottom_toTopOf="@id/amount_edittext"/>
<ImageButton
android:id="@+id/paste_address_imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@android:color/transparent"
android:minWidth="48dp"
android:minHeight="48dp"
android:src="@drawable/ic_content_paste_24dp"
app:layout_constraintBottom_toBottomOf="@id/address_edittext"
app:layout_constraintEnd_toStartOf="@id/scan_address_imagebutton"
app:layout_constraintStart_toEndOf="@id/address_edittext"
app:layout_constraintTop_toTopOf="@id/address_edittext"
tools:ignore="SpeakableTextPresentCheck"
tools:visibility="visible" />
<ImageButton
android:id="@+id/scan_address_imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:minWidth="48dp"
android:minHeight="48dp"
android:layout_marginEnd="24dp"
android:src="@drawable/ic_scan"
app:layout_constraintBottom_toBottomOf="@id/address_edittext"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/paste_address_imagebutton"
app:layout_constraintTop_toTopOf="@id/address_edittext"
tools:ignore="SpeakableTextPresentCheck"
tools:visibility="visible" />
<EditText
android:id="@+id/amount_edittext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:layout_marginStart="24dp"
android:background="@drawable/edittext_bg"
android:hint="@string/amount"
android:inputType="numberDecimal"
app:layout_constraintBottom_toTopOf="@id/tx_fee_radiogroup"
app:layout_constraintTop_toBottomOf="@id/selected_utxos_value_textview"
app:layout_constraintBottom_toTopOf="@id/address_edittext"
app:layout_constraintEnd_toStartOf="@id/send_max_button"
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible" />
@ -141,6 +79,62 @@
app:layout_constraintStart_toEndOf="@id/amount_edittext"
app:layout_constraintTop_toTopOf="@id/amount_edittext"
tools:visibility="visible" />
<EditText
android:id="@+id/address_edittext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="4dp"
android:background="@drawable/edittext_bg"
android:layout_marginStart="24dp"
android:ellipsize="middle"
android:hint="@string/address"
android:singleLine="true"
app:layout_constraintEnd_toStartOf="@id/paste_address_imagebutton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/send_max_button"
tools:visibility="visible" />
<TextView
android:id="@+id/donate_label_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/donate_label"
android:layout_marginStart="24dp"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_edittext"/>
<ImageButton
android:id="@+id/paste_address_imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:background="@android:color/transparent"
android:minWidth="48dp"
android:minHeight="48dp"
android:src="@drawable/ic_content_paste_24dp"
app:layout_constraintBottom_toBottomOf="@id/address_edittext"
app:layout_constraintEnd_toStartOf="@id/scan_address_imagebutton"
app:layout_constraintStart_toEndOf="@id/address_edittext"
app:layout_constraintTop_toTopOf="@id/address_edittext"
tools:ignore="SpeakableTextPresentCheck"
tools:visibility="visible" />
<ImageButton
android:id="@+id/scan_address_imagebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:minWidth="48dp"
android:minHeight="48dp"
android:layout_marginEnd="24dp"
android:src="@drawable/ic_scan"
app:layout_constraintBottom_toBottomOf="@id/address_edittext"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/paste_address_imagebutton"
app:layout_constraintTop_toTopOf="@id/address_edittext"
tools:ignore="SpeakableTextPresentCheck"
tools:visibility="visible" />
<TextView
android:id="@+id/tx_fee_radiogroup_label_textview"
@ -161,8 +155,7 @@
android:orientation="horizontal"
android:layout_marginStart="8dp"
android:layout_marginEnd="24dp"
app:layout_constraintTop_toBottomOf="@id/send_max_button"
app:layout_constraintBottom_toTopOf="@id/create_tx_button"
app:layout_constraintTop_toBottomOf="@id/donate_label_textview"
app:layout_constraintStart_toEndOf="@id/tx_fee_radiogroup_label_textview"
app:layout_constraintEnd_toEndOf="parent">
<RadioButton
@ -194,6 +187,7 @@
android:layout_height="wrap_content"
android:background="@drawable/button_bg"
android:text="@string/create"
android:layout_marginTop="24dp"
android:layout_marginEnd="24dp"
android:layout_marginStart="24dp"
app:layout_constraintBottom_toBottomOf="parent"
@ -216,7 +210,6 @@
android:visibility="gone"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toTopOf="@id/amount_pending_textview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/send_monero_textview"
@ -233,7 +226,6 @@
android:visibility="gone"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toTopOf="@id/fee_textview"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/address_pending_textview"
@ -250,7 +242,6 @@
android:visibility="gone"
android:layout_marginStart="24dp"
android:layout_marginEnd="24dp"
app:layout_constraintBottom_toTopOf="@id/send_tx_button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/amount_pending_textview"

View File

@ -52,8 +52,8 @@
<string name="sending_all">SENDING ALL</string>
<string name="send">Send</string>
<string name="create">Create</string>
<string name="send_monero">Send Monero</string>
<string name="recv_monero">Receive Monero</string>
<string name="send_monero">Send</string>
<string name="recv_monero">Receive</string>
<string name="more_options">More options</string>
<string name="recovery_phrase_optional">Recovery phrase (optional)</string>
<string name="restore_height_optional">Restore height (optional)</string>