Developers

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
Tags (1)
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 
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!