Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android TV Touchables #17966

Closed
sungjkim34 opened this issue Feb 13, 2018 · 2 comments
Closed

Android TV Touchables #17966

sungjkim34 opened this issue Feb 13, 2018 · 2 comments
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot. Resolution: PR Submitted A pull request with a fix has been provided.

Comments

@sungjkim34
Copy link

sungjkim34 commented Feb 13, 2018

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.3.2
npm: 5.6.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.53.0 => 0.53.0

Target Platform: AndroidTV

Steps to Reproduce

(Write your steps here:)

  1. Run app in Android TV emulator.
  2. Try using keyboard or D-pad to navigate through any touchable.
  3. Try using keyboard or D-pad to navigate through any inputs.

Expected Behavior

According to the React Native documentations, it states:

TV devices support has been implemented with the intention of making existing React Native applications "just work" on Apple TV and Android TV, with few or no changes needed in the JavaScript code for the applications.

and

When running on Android TV the Android framework will automatically apply a directional navigation scheme based on relative position of focusable elements in your views.

However, it does not work as stated.
Need to either update the documentations or fix the behavior.

Actual Behavior

Touchable are not being highlighted and cannot be interacted with.
This works fine with AppleTV's tvOS.
This also works with NativeScript on AndroidTV.

Current Workaround (for my case)

Currently, I've implemented custom abstraction layer for buttons with an isSelected attribute.
I am manually navigating through the 'selected' buttons by using the react-native-keyevent library from Kevine John and if the isSelected attribute is true, setting the opacity higher and manually calling the function when the 'enter/select' key is pressed.
However, this is not optimal and I believe that a native implementation is very possible.

@douglowder
Copy link
Contributor

There is a PR being worked on for proper Android TV support... #16500 . Does it address the issue?

@hramos hramos added Resolution: PR Submitted A pull request with a fix has been provided. Android labels Mar 5, 2018
@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Mar 18, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@react-native-bot react-native-bot added the Platform: macOS Building on macOS. label Mar 20, 2018
@hramos hramos removed the Platform: macOS Building on macOS. label Mar 29, 2018
@hramos
Copy link
Contributor

hramos commented May 17, 2018

#16500 merged.

@hramos hramos closed this as completed May 17, 2018
@hramos hramos added the Resolution: Fixed A PR that fixes this issue has been merged. label May 17, 2018
@facebook facebook locked as resolved and limited conversation to collaborators May 17, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Fixed A PR that fixes this issue has been merged. Resolution: Locked This issue was locked by the bot. Resolution: PR Submitted A pull request with a fix has been provided.
Projects
None yet
Development

No branches or pull requests

5 participants