Question around Compose on TV where focus takes a ...
# compose-android
a
Question around Compose on TV where focus takes a front seat: While using "Surface" (the clickable version) from androidx.tv.material3, the documentations says "enabled - Controls the enabled state of the surface. When false, this Surface will not be clickable or focusable." , but on the TV is still gained focus even when enabled=false As a side note, digging around UX forums the opinions are split if disabled buttons should be able to gain focus or not. Looking in https://developer.android.com/design/ui/tv/guides/styles/focus-system#disabled looks like a disabled focused buttons does have a distinct look, but this is in contrast to the "surface will not be ... focusable" from the documentation. Any idea what's the correct behavior?
z
@Ralston Da Silva
a
Curious if anyone had a chance to look into this?
r
This is by design. The TV team decided that they wanted disabled buttons to be focusable, but not clickable. They even have a UI indication for a disabled button that is focused: https://developer.android.com/design/ui/tv/guides/styles/focus-system#buttons Here is a comment in the code where they specifically mention the reasoning behind this: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:tv/tv-ma[…]Surface.kt;drc=2071c36ad3797c0b6011b449a51b01020cd23ef9;l=411
🙏 1
a
Thanks @Ralston Da Silva! If you can also pass to the team what I mentioned above, how a clickable Surface says "enabled - Controls the enabled state of the surface. When false, this Surface will not be clickable or focusable." maybe consider removing the word "(not be)... focusable" since it must stay focusable by design. Thanks again! I'll pass this to my team and designer