Used a TextInputLayout with a disabled TextInputEditText behind the Asset spinner in SendTransactionFragment, so that it looks similar to the other fields (To, Amount and Memo).

This commit is contained in:
Severiano Jaramillo 2019-03-19 18:39:55 -06:00
parent 25bab08b5e
commit f89878d6b9

View file

@ -74,37 +74,52 @@
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilAsset"
style="@style/Widget.Bitsy.TextInputLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/text__asset"
android:layout_marginStart="12dp"
android:layout_marginEnd="@dimen/activity_horizontal_margin"
app:layout_constraintTop_toTopOf="@id/tilAmount"
app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"
app:layout_constraintEnd_toEndOf="parent">
<cy.agorise.bitsybitshareswallet.views.MyTextInputEditText
android:id="@+id/tietAsset"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text=" "
android:textAlignment="textEnd"
android:enabled="false"
android:maxLines="1"
android:inputType="numberDecimal"/>
</com.google.android.material.textfield.TextInputLayout>
<Spinner <Spinner
android:id="@+id/spAsset" android:id="@+id/spAsset"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="12dp" android:layout_marginTop="6dp"
android:layout_marginStart="12dp" android:layout_marginStart="4dp"
android:layout_marginEnd="@dimen/activity_horizontal_margin" app:layout_constraintTop_toTopOf="@+id/tilAsset"
app:layout_constraintTop_toTopOf="@+id/tilAmount" app:layout_constraintBottom_toBottomOf="@id/tilAsset"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="@id/tilAsset"
app:layout_constraintStart_toEndOf="@id/centeredVerticalGuideline"/> app:layout_constraintEnd_toEndOf="@id/tilAsset"/>
<View
android:id="@+id/vSpinner"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="12dp"
android:background="@color/darkGray"
app:layout_constraintTop_toBottomOf="@+id/spAsset"
app:layout_constraintEnd_toEndOf="@+id/spAsset"
app:layout_constraintStart_toStartOf="@+id/spAsset" />
<TextView <TextView
android:id="@+id/tvAvailableAssetAmount" android:id="@+id/tvAvailableAssetAmount"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:textAppearance="@style/TextAppearance.Bitsy.Caption" android:textAppearance="@style/TextAppearance.Bitsy.Caption"
tools:text="12.01253 BTS" tools:text="12.01253 BTS"
android:textAlignment="center" android:textAlignment="center"
app:layout_constraintTop_toBottomOf="@id/vSpinner" app:layout_constraintTop_toBottomOf="@id/tilAsset"
app:layout_constraintStart_toStartOf="@id/vSpinner" app:layout_constraintStart_toStartOf="@id/tilAsset"
app:layout_constraintEnd_toEndOf="@id/vSpinner"/> app:layout_constraintEnd_toEndOf="@id/tilAsset"/>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tilMemo" android:id="@+id/tilMemo"