alexboyer
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2017
07:58 PM
Left / right navigation when ButtonGroup layoutDirection = horiz
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
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
7 REPLIES 7
alexboyer
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-05-2017
02:04 PM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
I ended up using LayoutGroup instead combined with onKeyEvent and a field observer to handle the navigation.
nmaves
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017
03:08 PM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
Is this really the only way to do this?
zachbarnes
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2017
03:01 PM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
Has anyone figure out how to handle this with the ButtonGroup?
nmaves
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2017
01:52 PM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
I ended up writing my own <HorizontalButtonGroup>.
I am sure it could be better. Maybe I should put it out on github.
Nathan
I am sure it could be better. Maybe I should put it out on github.
Nathan
nithinks94
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2017
02:40 AM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
@nmaves, do you have this code documented anywhere?
nmaves
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2017
09:45 PM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
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.
csangkravat
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2018
02:17 AM
Re: Left / right navigation when ButtonGroup layoutDirection = horiz
Don't think too much!!, Please feel free and try 'focusButton'.
just in case, I used something like this!
here's the link: https://sdkdocs.roku.com/display/sdkdoc/ButtonGroup
Good Luck!
Geb
just in case, I used something like this!
//Sample Code
function onKeyEvent(key as String, press as Boolean) as Boolean
if key = "right"
m.yourbutton.focusButton = 1
else if key = "left"
m.yourbutton.focusButton = 0
end if
end function
here's the link: https://sdkdocs.roku.com/display/sdkdoc/ButtonGroup
Good Luck!
Geb