Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
streamotor
Level 7

Setting the Focus to the Hero Screen

I am writing a channel with a search feature and when I go to the search function with the options button, it works fine, but then when I return with options button, something happens that does not allow me to scroll through the different applications. If i would hit the options button again, it sends me to the search keyboard like it is supposed to, but once again will not let me select the keys (maybe losing focus). Here is the code for the event when i hit options:

if key = "options"
      if m.HeroScreen.visible = true and m.SearchKeyboard.visible = false
          print "------ [options pressed] ------"
          m.FadeIn.control = "start"
          m.HeroScreen.visible = "false"
          m.SearchKeyboard.setFocus(true)
          m.SearchKeyboard.visible = "true"
          result = true
      else if m.SearchKeyboard.visible = true and m.HeroScreen.visible = false
          print "I PRESSED IT"
          m.FadeOut.control = "start"
          m.HeroScreen.visible = "true"
          m.SearchKeyboard.visible = "false"
         ' m.SearchKeyboard.setFocus(false)
          m.HeroScreen.setFocus(true)
          result = true
      end if
0 Kudos
1 Reply
streamotor
Level 7

Re: Setting the Focus to the Hero Screen

It works when I go to the DetailsScreen and back but not to this search screen. The search screen is basically just a MiniKeyboard with a black background 
0 Kudos