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: 
jaxim
Visitor

Re: Problem w/ Changing the focusBitmapUri of MiniKeyboard

p.s. I am now focused on resolving issue #1 (the focused background key not being as big as expected when using focusBitmapUri) as issue #2 has been resolved by using a slight transparency when setting the color.
Again thanks!
0 Kudos
speechles
Roku Guru

Re: Problem w/ Changing the focusBitmapUri of MiniKeyboard

    m.top.keyboard.focusBitmapUri = "pkg:/images/actions/listbtnfocus.png"

Works for me. Although, like I said my listbtnfocus.png is a proper 9patch. It shrinks and grows just like the stock white one does on the keyboard. Including the shrink/grow effect when you press OK on a key.

I really think it is your 9patch png causing you issues since mine works as expected.
0 Kudos
jaxim
Visitor

Re: Problem w/ Changing the focusBitmapUri of MiniKeyboard

Currently my 9-patch image is 80x80. It has rounded corners. There is no longer a transparent border - but instead goes 1 pixel from any of the edges. There are four 1-pixel wide or high black lines around the edge of the image to indicate where the image can stretch.

Does this sound like your 9-patch image that you are using?
0 Kudos
speechles
Roku Guru

Re: Problem w/ Changing the focusBitmapUri of MiniKeyboard



Above is the 9patch you can use for keyboards and dialogs. In this same vein you make the focus indicator 9patch you want except make it a more squashed rectangle not so tall. Corners not so big. Maybe 4-5x wider than it is in height.

The 9patch above grows/shrinks just fine as the dialog background (which shows for keyboards too). Color/Darken/Lighten/Resize as needed. This is a PNG with opacity.

Notice the edge is the edge. There is no 1 pixel border extra anything. WYSIWYG. Wizzy Wig. What you see is what you get.

The 9patch is a fancy way to say "it notices the corners". The only special things about a 9patch is the rounded corners. The rest is just a simple rectangle. Keep your edges as the edges. Only does the edge change at the corners. You can be as elaborate as you like in these 9patch. This is of course just a simple example to illustrate where you are making a mistake. From here you should be able to understand this completely and go wild design your 9patch of your dreams.
0 Kudos
white-wolf
Reel Rookie

Re: Problem w/ Changing the focusBitmapUri of MiniKeyboard

This issue is still (im using proper 9 patch) and also used the 9 patch from the guy above me, and could not have similar behaviour as the default one (enlarge and resize automatically on focus) , anyone found out how to do it?  

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.