Tash
11/03/2023, 9:27 PMTextButton : AbstractComposeView
internally calls @Composable fun TextButton
. We use a custom setIsEnabled()
instead of the traditional View#setEnabled
that updates the Compose state which makes Espresso testing a bit tricky.
We’re considering overriding View#setEnabled
and calling super.setEnabled()
in addition to updating the Compose state, to sync Compose and view layers, but are concerned about conflicts with rendering since View#setEnabled
does cause layout invalidation.
1. Is it advisable/ok to override View#setEnabled
for Views that extend AbstractComposeView
?
2. Any other suggestions for syncing Compose and view layers while keeping Espresso testing straightforward?
Thanks!Zach Klippenstein (he/him) [MOD]
11/03/2023, 11:05 PMTash
11/04/2023, 12:21 AMTash
11/04/2023, 12:22 AMZach Klippenstein (he/him) [MOD]
11/04/2023, 12:24 AMZach Klippenstein (he/him) [MOD]
11/04/2023, 12:25 AMZach Klippenstein (he/him) [MOD]
11/04/2023, 12:26 AMTash
11/04/2023, 12:27 AMTash
11/04/2023, 12:45 AM