[activity] settitle {Hello};
set _layoutparams [linearlayoutparams -new {FILL_PARENT WRAP_CONTENT}];
set _layout [linearlayout -new [activity] -layoutparams $_layoutparams];
$_layout setorientation VERTICAL;
set _scroll [scrollview -new [activity] -layoutparams $_layoutparams];
$_scroll addview $_layout;
[activity] setcontentview $_scroll;
$_layout addview [textview -new [activity] -text "Hello, this is a test.\n" -layoutparams $_layoutparams];
set _button [button -new [activity] -text {Click me} -layoutparams $_layoutparams -onclicklistener [callback -new [list [list hello]]]];
$_layout addview $_button;
proc hello {from_button} {
...
}