I create a card game (for tvos) where the user must be able to remove cards from the board. At the end of the game, only a few cards can be left on the board, and they can, for example, be located in the form of buttons in the figure below.
How can I let the user move the focus from button 1 to 0 or 2?
Unacceptable answers to a similar question in SO were suggested to be used UIFocusGuide. I donβt think this answer applies to my problem, because in this approach you need to specify focusGuide in advance preferredFocusedView(for example, before the user siri-remote)! In my case, the preferred next focus depends on the direction of the finger, for example. focusHeading.
UIFocusGuide
preferredFocusedView
focusHeading
UIFocusGuide - , a preferredFocusedView , , ( ).
, , , 1 0 2.
, , 0.
1, , 2 .
, , . , , 0 , preferredFocusedView , 1, 0 1.
, , Focus Engine . , , .
Source: https://habr.com/ru/post/1621706/More articles:Like x = new int [2]; work in this java code? - javaTesting try / catch with a function in Java 8 - javaSwitch opacity to other divs - jqueryAnimating sound amplitude in CustomView - androidgetting NULL in sql table while parsing xml in SQL Server 2008 - sqlDo two elements occur when they hang, and then one disappears when the other hangs? - cssClassNotFoundException user control in Scene Builder - javaUnable to import custom components with custom cell factories - java-8Automatically refresh the page when changing while the pub is working (dart) - dartThe crypt SHA 512 output written with Python code is different from mkpasswd - pythonAll Articles