Your Digital Media Has Never Looked So Good

 
alexboyer
Topic Author
Posts: 29
Joined: Tue May 07, 2013 11:55 am

Left / right navigation when ButtonGroup layoutDirection = horiz

Tue Apr 04, 2017 7:58 pm

Hello,

I'm trying to get a horizontal row of buttons to change focus when the left and right keys are pressed, but when I set layoutDirection="horiz" it still only uses up and down... I can't see what I'm doing wrong from the documentation. Any help would be appreciated!

Thanks
 
alexboyer
Topic Author
Posts: 29
Joined: Tue May 07, 2013 11:55 am

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Wed Apr 05, 2017 2:04 pm

I ended up using LayoutGroup instead combined with onKeyEvent and a field observer to handle the navigation.
 
nmaves
Posts: 42
Joined: Mon Jul 10, 2017 6:52 pm

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Fri Aug 04, 2017 3:08 pm

Is this really the only way to do this?
 
zachbarnes
Posts: 2
Joined: Mon May 22, 2017 11:33 pm

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Sun Oct 08, 2017 3:01 pm

Has anyone figure out how to handle this with the ButtonGroup?
 
nmaves
Posts: 42
Joined: Mon Jul 10, 2017 6:52 pm

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Tue Oct 10, 2017 1:52 pm

I ended up writing my own <HorizontalButtonGroup>. 

I am sure it could be better.  Maybe I should put it out on github.

Nathan
 
nithinks94
Posts: 2
Joined: Fri Nov 17, 2017 1:51 am

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Fri Nov 17, 2017 3:40 am

@nmaves, do you have this code documented anywhere?
 
nmaves
Posts: 42
Joined: Mon Jul 10, 2017 6:52 pm

Re: Left / right navigation when ButtonGroup layoutDirection = horiz

Mon Nov 20, 2017 10:45 pm

I have not posted it anywhere but I could.  I ended up not even using the Button component from Roku.  I made my own with rectangles and text nodes as I wanted to apply different colors for the active and non-active states.

Who is online

Users browsing this forum: No registered users and 3 guests