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

How to do popup dialog like Amazon video?

When you press certain buttons on the Springboard screen, you get slick little mini dialogs that align perfectly with that button....making it work almost like a "select" item in html.


Is this something that is easy to do with a built in widget, or did they have to do some low-level magic to do it?
0 Kudos
4 REPLIES 4
RokuChris
Roku Employee
Roku Employee

Re: How to do popup dialog like Amazon video?

My guess would be that it's a roImageCanvas laid over the springboard
0 Kudos
rjbrown
Visitor

Re: How to do popup dialog like Amazon video?

That's what I guessed, but how did they measure so accurately, so that the box appears perfectly superimposed on the button they pressed? Is it possible to get screen positioning coordinates of buttons on a springboard screen?

I'd hesitate to just make the assumption that the buttons will be in exactly the same pixel position on everyone else's screen, as they are on mine...
0 Kudos
destruk
Binge Watcher

Re: How to do popup dialog like Amazon video?

For the middle area/active area of a screen display it will be in the same place for everyone, provided you check the display mode of the roku box. The main trouble with positioning comes into play for the outer edge/bezel area that varies between tvs.
You can take a screenshot in dev mode from the web interface for 1280x720 and get exact pixel coordinates from that, and adjust for the other possible screen sizes with some simple multiplication. - ie 1280x720 is 66% of 1920x1080, so multiply the pixels from the screenshot by 1.5 and there you go.
0 Kudos
rjbrown
Visitor

Re: How to do popup dialog like Amazon video?

Thanks, that's helpful.
0 Kudos