When the send button is disabled in SendTransactionFragment the background view is also 'disabled' changing its color to a lighter gray.

master
Severiano Jaramillo 2019-01-03 10:47:58 -06:00
parent f0b959b496
commit 2643b0af4d
4 changed files with 14 additions and 4 deletions

View File

@ -400,10 +400,13 @@ class SendTransactionFragment : Fragment(), ZXingScannerView.ResultHandler, Serv
}
private fun enableDisableSendFAB() {
if (isToAccountCorrect && isAmountCorrect)
if (isToAccountCorrect && isAmountCorrect) {
fabSendTransaction.enable(R.color.colorSend)
else
vSend.setBackgroundResource(R.drawable.send_fab_background)
} else {
fabSendTransaction.disable(R.color.lightGray)
vSend.setBackgroundResource(R.drawable.send_fab_background_disabled)
}
}
private fun startSendTransferOperation() {

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<corners
android:bottomLeftRadius="60dp"
android:topLeftRadius="60dp" />
<solid android:color="@color/superLightGray" />
</shape>

View File

@ -172,7 +172,7 @@
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginEnd="0dp"
android:background="@drawable/send_fab_background"
android:background="@drawable/send_fab_background_disabled"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/viewCamera"
app:layout_constraintBottom_toBottomOf="@id/viewCamera"/>

View File

@ -11,7 +11,7 @@
<color name="gray">#888</color>
<color name="ppGreen">#139657</color>
<color name="lightGray">#aaa</color>
<color name="superLightGray">#e0e0e0</color>
<color name="superLightGray">#d0d0d0</color>
<color name="darkGray">#616161</color>
<color name="colorReceive">#669900</color>
<color name="colorSend">#DC473A</color>