Do designer scripts work on widget layouts?
I have a widget with 4 image views and a label on a panel. When I run the script in the designer, all the views move to where I want them. When I load the widget on the device, the views are where they were placed originally (as if the script was not run).
Code below. Activity is the parent of pnlWidget. pnlWidget is the parent of the remaining views.
I have a widget with 4 image views and a label on a panel. When I run the script in the designer, all the views move to where I want them. When I load the widget on the device, the views are where they were placed originally (as if the script was not run).
Code below. Activity is the parent of pnlWidget. pnlWidget is the parent of the remaining views.
B4X:
'All variants script
AutoScaleAll
imgPause.Bottom=pnlWidget.Bottom-5dip
imgPlay.Bottom=imgPause.Bottom
imgStop.Bottom=imgPause.Bottom
imgNext.Bottom=imgPause.Bottom
imgPause.Right = pnlWidget.HorizontalCenter-10dip
imgStop.Left = pnlWidget.HorizontalCenter+10dip
imgPlay.Right = imgPause.Left - 20dip
imgNext.Left = imgStop.Right + 20dip
lblShow.Top=pnlWidget.Top+1dip
lblShow.Height=pnlWidget.Height-imgPause.Height-3dip
lblShow.Left = 10dip
lblShow.Width = pnlWidget.Width-20dip