Bug in Brightscript? Erroneous margins for a MarkupList inside LayoutGroup
While building my layout UI, I have encountered a very strange issue:
I have a MarkupList with my menu items. Its translation is [0,0]. If I place it as a child of my component (or in a Group), everything is good - it appears at the right place. But, the moment I put it as a child of a vertical LayoutGroup, it is presented with margins of 36 from both the left and the right sides.It seems to be specific for MarkupList as any other component behaves well.
Re: Bug in Brightscript? Erroneous margins for a MarkupList inside LayoutGroup
"owen777" wrote: Yup, it's a bug - MarkupList adds dynamic translation when inside LayoutGroup.
Don't expect any answer from Roku
You can use a layoutgroup inside a layout group to get around that. Just nest the MarkupList into the double-nested layoutgroups which only have the markup list inside.
<layout group id="lots of stuff"> <layoutgroup id="myMarkupGroup" translation="[x,y]" ...> <layoutgroup id="myMarkupAdjuster" translation="[adjustX,adjustY]" > <markuplist ... /> </layoutgroup> </layoutgroup> ... next layout group, etc ... until you run out of layout groups </layoutgroup>
Adjust translation on nested layout group as required. There are other "things" you need to do this on too it isn't just MarkupList where the documentation is wrong.