Open maxAman opened 6 years ago
I think this is not issue. You can custom binding adapter:
object MoneyTextViewBindingAdapter {
@JvmStatic
@BindingAdapter(value = ["moneyTextViewValue", "moneyTextViewSymbol"], requireAll = false)
fun moneyTextViewValue(sender: MoneyTextView, value: Float?, symbol: String?) {
sender.setAmount(value ?: 0.0f, symbol ?: "")
}
}
And in layout xml file, use your custom binding adapter instead of library attribute amount
:
<org.fabiomsr.moneytextview.MoneyTextView
moneyTextViewSymbol="@{ presenter.defaultCurrency.symbol_native }"
moneyTextViewValue="@{ safeUnbox(viewModel.thisMonthExpensed) }"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
when I am trying to set , app:amount="@{data.totals.subTotal}" then the issue occurs. Please do something