This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
sample_code:layout_children [2014/12/01 06:32] stevegarman |
sample_code:layout_children [2014/12/29 02:20] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Layout Children ====== | ====== Layout Children ====== | ||
- | DroidScript' | + | DroidScript' |
===== ChildToBack ===== | ===== ChildToBack ===== | ||
<code javascript childToBack.js> | <code javascript childToBack.js> | ||
Line 42: | Line 42: | ||
return children; | return children; | ||
} | } | ||
+ | </ | ||
+ | ===== clearLayout ===== | ||
+ | <code JavaScript clearlayout.js> | ||
+ | function clearLayout(layt) | ||
+ | { | ||
+ | // | ||
+ | var allobjs = app.GetObjects(); | ||
+ | var obj, | ||
+ | // | ||
+ | for (var id in allobjs) | ||
+ | { | ||
+ | obj = allobjs[id] | ||
+ | // | ||
+ | order = layt.GetChildOrder( obj ); | ||
+ | if( order > | ||
+ | { | ||
+ | // | ||
+ | layt.DestroyChild( obj ); | ||
+ | } | ||
+ | } | ||
+ | } | ||
</ | </ | ||
===== Sample app ===== | ===== Sample app ===== |