0

How to set a background image in brightscript for a particular screen?

Is dfNewBitmapSet() the method used to set the background?!

kindly share your answers

Nas Banov
  • 28,347
  • 6
  • 48
  • 67
  • You should be more specific what you are doing. Are you using `roScreen` or `roImageCanvas` or is this about one of the dialog screens? – Nas Banov Mar 15 '15 at 16:53
  • Hi Nas,I want to set a background using roImageCanvas and provide button press for the images i give there – EverythinMatters Mar 16 '15 at 04:24

2 Answers2

0

You cannot set custom background images for any of the built-in screens, only a background color. You can fake it for roListScreen by setting the HDBackgroundImageUrl/SDBackgroundImageUrl content metadata for every item, but that can make the screen incredibly sluggish to navigate.

TheEndless
  • 301
  • 1
  • 3
0

Just use setLayer(0, ...) for the background.

I.e. put the background image in the farthest layer (doesn't have to be z-order 0 but i picked this as example since it's the last visible layer).

Nas Banov
  • 28,347
  • 6
  • 48
  • 67
  • works thanks!!..And how do i pick either a hd image or sd image basing on the TV screen sizes.how to check device size and set the image or text on canvas screen – EverythinMatters Mar 18 '15 at 06:46
  • [roDeviceInfo.getDisplaySize()](http://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo#ifDeviceInfo-GetDisplaySizeasObject) and the three previous methods, i think – Nas Banov Mar 19 '15 at 04:37
  • ohk,how to pick HD/SD image for background and set.Is it using setLayer again?? – EverythinMatters Mar 19 '15 at 04:41