Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
streamotor
Visitor

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 1
streamotor
Visitor

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
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.