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

Creating custom focus indicators for Scene Graph lists

We're trying to create custom focus indicators for some scene graph components and are having trouble getting them right. Indicators either sit inside the list item, or there is padding around the image, we seem to be hitting a wall trying to get an image to sit perfectly around a list item.

Does anyone (or Roku) have an example focus indicator or at least instructions on how they should be created?
0 Kudos
2 REPLIES 2
MediaDev
Visitor

Re: Creating custom focus indicators for Scene Graph lists

Hi,
You can have a rectangle as a part of list item which is having the width and height, slightly more than that of the text item(use boundingRect on the label node to get the label node properties).
Only when the focus comes comes to a list item, this rectangle can be made visible.

Media Dev
0 Kudos
valicode
Visitor

Re: Creating custom focus indicators for Scene Graph lists

Hello,

We have done this for our project. You need to create a "9-Patch" png image that is transparent in the middle. One important thing when working with these images is that they must be named with a '.9.png' at the end in order for Roku to understand it's a special image.

If you need further help, feel free to contact me privately.
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.