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: 
cesarcarlos
Binge Watcher

Showing the rating badge in a label

Is there a way of showing the rating badge in a label?

I want a string the appear below the title of the video in the details screen with the format duration/year/rating (for example: "23:45 | 2021 | PG-13" , where PG-13 should be the badge).

I have the rating field set in the content and the following in brightscript:

m.detailsLabel.text = content.duration + " | " + content.year + " | " + content.rating

But it's just rendered as text.

0 Kudos
1 REPLY 1
renojim
Community Streaming Expert

Re: Showing the rating badge in a label

Labels can only contain text.  If you want to show a badge you'd have to add Poster over the label adjusting its position based on the length of the other text.  I don't even know if Roku makes the badges available or if you have to package the graphics with your channel.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
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.