Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

javascript - React Native Android Tv control focus-navigation in a nested FlatList

For React Native Android Tv Target Can't able to achieve below focus navigation for all touchables.

Steps to Reproduce for Demo::

Take a Flat List where its data should contain A, B & C with respective data in it. (Simpley like OTT home List with respective to title and carousel content) title would be the header and data would be the other nested Flat List which is Horizontal. For Example:

const dummyArray = [{
id: 1, title: "A", data: [0,1,2,3,4,5,6,7],
id: 2, title: "B", data: [0,1,2,3,4,5,6,7],
id: 3, title: "C", data: [0,1,2,3,4,5,6,7]
}];

When I Start pressing d'pad down for suppose I'm at section A(at Index-2) from there when I press d'pad down again it is going to section B( to Index-2). Would be this Actual behavior it behaves, but I'm expecting below behavior. Expected behavior:: it should go to starting index of each Row in the FlatList.

If I'm thinking wrong, could any one put me right path

System:
    OS: macOS 10.15.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 100.96 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.2 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.9.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
    Android SDK:
      API Levels: 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Android TV Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.1 AI-201.8743.12.41.6953283
    Xcode: 12.0.1/12A7300 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: Not Found
    react-native-macos: Not Found
    react-native-tvos:  0.63.3-0 
question from:https://stackoverflow.com/questions/65889411/react-native-android-tv-control-focus-navigation-in-a-nested-flatlist

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...