Any ideas on how I can migrate this to compose. I'...
# compose
c
Any ideas on how I can migrate this to compose. I'm using AndroidView for amountInput (CurrencyEditText, third party). asset is livedata and I observe it with observeAsState() like normally.
Copy code
Inside fragment::
transferWithdrawViewModel.asset.observe {
    amountInput.setMaxNumberOfDecimalDigits(it.precision.toInt())  **this line
}
Copy code
AndroidView(
    modifier = modifier,
    factory = { ctx ->
        // Creates custom view
        CurrencyEditText(ctx, null).apply {
a
Copy code
val asset by transferWithdrawViewModel.observeAsState()

AndroidView(
  // ...
  factory = { context ->
    CurrencyEditText(context)
  }
) { view ->
  // update block - this observes `asset` and runs when it changes
  view.setMaxNumberOfDecimalDigits(asset.precision.toInt())
}
c
Thanks a lot