daria
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2017
04:00 PM
MiniKeyboard is rendered shifted on SD screens
Hi!
My app was recently rejected, and one of the issues was MiniKeyboard rendering on SD screen. I used template from documentation, and it looks like this: http://prnt.sc/ej6r2z
If I don't use template, it also looks shifted same way.
How to fix this? May be grid template image should have another size?
Layout is following
My app was recently rejected, and one of the issues was MiniKeyboard rendering on SD screen. I used template from documentation, and it looks like this: http://prnt.sc/ej6r2z
If I don't use template, it also looks shifted same way.
How to fix this? May be grid template image should have another size?
Layout is following
<?xml version="1.0" encoding="UTF-8"?>
<component name="Search" extends="Group" xsi:noNamespaceSchemaLocation="http://rokudev.roku.com/rokudev/schema/RokuSceneGraph.xsd">
<script type="text/brightscript" uri="pkg:/components/Search/Search.brs" />
<children>
<LayoutGroup layoutDirection="horiz" translation="[250, 30]" itemSpacings="[50]">
<LayoutGroup layoutDirection="vert" itemSpacings="[30]">
<Label text="Search">
<Font role="font" uri="pkg:/fonts/Bold.ttf" size="32" />
</Label>
<MiniKeyboard id="keyboard"
keyboardBitmapUri="pkg:/images/keyboard_$$RES$$.png"
/>
</LayoutGroup>
<Group>
<Label text="Searching…" id="loading" visible="false" translation="[0, 30]">
<Font role="font" uri="pkg:/fonts/Regular.ttf" size="20" />
</Label>
<MarkupList id="videos"
translation="[0, 30]"
itemComponentName="VideoItem1"
itemSize="[360, 202]"
focusBitmapUri="pkg:/images/focus_box.9.png"
focusFootprintBitmapUri="pkg:/images/focus_empty.9.png"
itemSpacing="[0, 20]"
numRows="3"
/>
</Group>
</LayoutGroup>
</children>
</component>
7 REPLIES 7
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2017
05:40 PM
Re: MiniKeyboard is rendered shifted on SD screens
It looks like your code only targets the HD ui resolution, so make sure your manifest file includes:
ui_resolutions=hd
daria
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
02:31 AM
Re: MiniKeyboard is rendered shifted on SD screens
"belltown" wrote:
It looks like your code only targets the HD ui resolution, so make sure your manifest file includes:ui_resolutions=hd
So, if app uses MiniKeyboard, it's automatically cannot support SD screens?
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
08:39 AM
Re: MiniKeyboard is rendered shifted on SD screens
That's not correct.
ui_resolutions has nothing to do with what device resolutions are "supported".
It refers to what screen canvas sizes your code is assumed to be writing to.
If you write code that assumes a screen canvas size of 1920x1080, then your code is assumed to be writing to an FHD canvas. If your code assumes a screen canvas size of 1280x720, then your code is assumed to be writing to an HD canvas, and if your code assumes it is writing to a screen canvas size of 720x480, then it is assumed to be writing to an SD canvas.
So for example, if you want to display a rectangle in the center of the screen that occupies half the screen area, if your code assumed it was writing to an FHD canvas you'd use a 960x540 rectangle at [480, 270], for an HD canvas you'd write code to put a 640x360 rectangle at [320, 180], and for an SD canvas you'd put a 360x240 rectangle at [180, 120].
Your code can target any or all of the supported screen resolutions. I suspect that most Scene Graph channels target only one canvas size: either FHD or HD. If you want to write code that targets more than one canvas size then you need to do a lot more work. In that case, you'd need to write code to determine the display resolution currently being used by the user's Roku device, and write different code to lay out the canvas differently depending on which resolution is being used (e.g. using a different Scene specifying different display coordinates).
Whatever screen canvas size(s) your code targets is what you specify in the ui_resolutions manifest file entry.
When the channel actually runs on a user's device, the Roku looks at the ui_resolutions list and picks the resolution that it considers best for what the user's TV and Roku support.
If the user's TV and Roku resolution is not one of those specified in your ui_resolutions entry then the output is AUTOMATICALLY SCALED to fit on the user's TV screen.
For most cases, you can specify ui_resolutions=hd and write code for a 1280x720 screen canvas -- or ui_resolutions=fhd and code for a 1920x1080 canvas, and let the Roku handle automatic scaling for different display resolutions. If you care about your SD users (which Roku no longer does), then be sure to test the channel on an SD device to ensure everything scales to be readable without a magnifying glass and doesn't get the edges chopped off. However, I've yet to see a Scene Graph channel that meets that criteria on an SD TV. It's obviously not something that Roku QA are looking at -- although it looks like they do care if your keyboard letters fit in the grid though.
ui_resolutions has nothing to do with what device resolutions are "supported".
It refers to what screen canvas sizes your code is assumed to be writing to.
If you write code that assumes a screen canvas size of 1920x1080, then your code is assumed to be writing to an FHD canvas. If your code assumes a screen canvas size of 1280x720, then your code is assumed to be writing to an HD canvas, and if your code assumes it is writing to a screen canvas size of 720x480, then it is assumed to be writing to an SD canvas.
So for example, if you want to display a rectangle in the center of the screen that occupies half the screen area, if your code assumed it was writing to an FHD canvas you'd use a 960x540 rectangle at [480, 270], for an HD canvas you'd write code to put a 640x360 rectangle at [320, 180], and for an SD canvas you'd put a 360x240 rectangle at [180, 120].
Your code can target any or all of the supported screen resolutions. I suspect that most Scene Graph channels target only one canvas size: either FHD or HD. If you want to write code that targets more than one canvas size then you need to do a lot more work. In that case, you'd need to write code to determine the display resolution currently being used by the user's Roku device, and write different code to lay out the canvas differently depending on which resolution is being used (e.g. using a different Scene specifying different display coordinates).
Whatever screen canvas size(s) your code targets is what you specify in the ui_resolutions manifest file entry.
When the channel actually runs on a user's device, the Roku looks at the ui_resolutions list and picks the resolution that it considers best for what the user's TV and Roku support.
If the user's TV and Roku resolution is not one of those specified in your ui_resolutions entry then the output is AUTOMATICALLY SCALED to fit on the user's TV screen.
For most cases, you can specify ui_resolutions=hd and write code for a 1280x720 screen canvas -- or ui_resolutions=fhd and code for a 1920x1080 canvas, and let the Roku handle automatic scaling for different display resolutions. If you care about your SD users (which Roku no longer does), then be sure to test the channel on an SD device to ensure everything scales to be readable without a magnifying glass and doesn't get the edges chopped off. However, I've yet to see a Scene Graph channel that meets that criteria on an SD TV. It's obviously not something that Roku QA are looking at -- although it looks like they do care if your keyboard letters fit in the grid though.
daria
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
08:49 AM
Re: MiniKeyboard is rendered shifted on SD screens
Thank you very much for the explanation! Will try this
destruk
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
11:22 AM
Re: MiniKeyboard is rendered shifted on SD screens
If you care about your SD users (which Roku no longer does) - that isn't quite accurate as Roku won't allow us to drop SD support from our apps. So they do care about SD users.
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
12:18 PM
Re: MiniKeyboard is rendered shifted on SD screens
"destruk" wrote:
If you care about your SD users (which Roku no longer does) - that isn't quite accurate as Roku won't allow us to drop SD support from our apps. So they do care about SD users.
Let me rephrase that:
"Of the 20+ public Scene Graph channels I have watched on my SD TV, a total of ZERO display in a way that I would consider acceptable if I were QA'ing Roku channels. Fonts are too small to read; the safe zones are not respected, leading to images and text that don't fit on the screen; background images and colors are used in such a way that even if the font size is barely large enough to read, you still can't read the text because of the surrounding contrast. Plus, there's no longer support for an SD Home screen icon, leading to distortion when the HD icon is rendered on an SD screen; and the SD splash screen image no longer works -- it displays the HD image for a fraction of a second, followed by a blank screen for the remainder of splash_min_time."
So while, yes, Roku still "supports" SD TVs and "requires" channel developers to "support" SD TVs, whether Roku "cares" at all about its SD users, and just how much they "care", I suppose is subjective and a matter of one's own personal opinion.
renojim
Community Streaming Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2017
01:25 PM
Re: MiniKeyboard is rendered shifted on SD screens
To add to "Roku doesn't care about SD", they introduced a bug in RAF v2.0 that they haven't acknowledged or fixed, so it's clear that they don't even bother testing their own stuff on SD.
-JT
-JT
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.
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.