diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt index 7c30c40c..ec6df293 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/ui/android/dialogs/TransferMoneyDialog.kt @@ -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) + } } } \ No newline at end of file diff --git a/ui/BankingAndroidApp/src/main/res/values/dimens.xml b/ui/BankingAndroidApp/src/main/res/values/dimens.xml index a5d67219..5fb725fa 100644 --- a/ui/BankingAndroidApp/src/main/res/values/dimens.xml +++ b/ui/BankingAndroidApp/src/main/res/values/dimens.xml @@ -55,9 +55,7 @@ 4dp 40dp - 4dp - 12dp - 50dp + 8dp 14sp 6dp 6dp