This site permanently moved to
https://droidscript.github.io
. Please update links accordingly.
You are being forwarded automatically in 3...
[stay here]
Back
SetPosition
Hello World
Change the main app's position and size.
app.SetPosition(
left
,
top
,
width
,
height
,
options
)
Mostly used for transparent apps.
Example - SetPosition
click to expand contents
function
OnStart
(
)
{
app
.
SetPosition
(
0.2
,
0.2
,
.6
,
.6
)
;
lay
=
app
.
CreateLayout
(
"linear"
,
"VCenter,fillxy"
)
;
lay
.
SetBackColor
(
"blue"
)
btn
=
app
.
CreateButton
(
"Hello World"
,
0.3
,
0.1
)
;
// 1, 1 will overflow
lay
.
AddChild
(
btn
)
;
app
.
AddLayout
(
lay
)
;
}
Copy
Copy All
Run
Number:
fraction (0..1)
String:
“px”
loading