Added same space to next EditText if there is a validation hint or error is displayed
This commit is contained in:
parent
826221497b
commit
f26c59d2f4
|
@ -35,6 +35,7 @@ import net.dankito.banking.bankfinder.BankInfo
|
|||
import net.dankito.banking.util.ValidationResult
|
||||
import net.dankito.utils.multiplatform.toBigDecimal
|
||||
import net.dankito.utils.android.extensions.asActivity
|
||||
import net.dankito.utils.android.extensions.getDimension
|
||||
import java.math.BigDecimal
|
||||
import java.text.DecimalFormatSymbols
|
||||
import java.text.NumberFormat
|
||||
|
@ -432,6 +433,12 @@ open class TransferMoneyDialog : DialogFragment() {
|
|||
if (validationResult.validationError == null) { // don't overwrite error text
|
||||
textInputLayout.helperText = validationResult.validationHint
|
||||
}
|
||||
|
||||
(textInputLayout.layoutParams as? ViewGroup.MarginLayoutParams)?.let { params ->
|
||||
val isShowingHintOrError = validationResult.validationError != null || validationResult.validationHint != null
|
||||
params.bottomMargin = if (isShowingHintOrError == false || textInputLayout == lytUsage) 0
|
||||
else context!!.getDimension(R.dimen.dialog_transfer_money_input_fields_bottom_margin_when_displaying_validation_label)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -55,9 +55,7 @@
|
|||
|
||||
<dimen name="dialog_transfer_money_padding">4dp</dimen>
|
||||
<dimen name="dialog_transfer_money_input_fields_height">40dp</dimen>
|
||||
<dimen name="dialog_transfer_money_label_margin_right">4dp</dimen>
|
||||
<dimen name="dialog_transfer_money_bank_accounts_margin_bottom">12dp</dimen>
|
||||
<dimen name="dialog_transfer_money_autocomplete_fields_height">50dp</dimen>
|
||||
<dimen name="dialog_transfer_money_input_fields_bottom_margin_when_displaying_validation_label">8dp</dimen>
|
||||
<dimen name="dialog_transfer_money_instant_payment_text_size">14sp</dimen>
|
||||
<dimen name="dialog_transfer_money_instant_payment_margin_top">6dp</dimen>
|
||||
<dimen name="dialog_transfer_money_instant_payment_margin_bottom">6dp</dimen>
|
||||
|
|
Loading…
Reference in New Issue