It is possible to force a button to be focused ? I know the user can focused an element but I want to make it programmatically
Asked
Active
Viewed 1,520 times
1 Answers
1
Yes it is possible, with tvOS and react native if you want to force a focusable component to be focus you just need to set hasTVPreferredFocus to true
For example:
<TouchableHighlight
hasTVPreferredFocus={true}
onPress={() => {}}
>
<Text>Hello</Text>
</TouchableHighlight>

Julien Kode
- 5,010
- 21
- 36