Access to Android's GUI with Hecl

zdia edited this page Oct 9, 2011 · 3 revisions

Testing management

  • If the Hecl script script.hcl contains just the line:
source /sdcard/myscript.hcl

then you can push your changes to myscript.hcl with

adb push myscript.hcl /sdcard/myscript.hcl

and restart the app on the emulator.

  • Install the application on sdcard

Change the header in AndroidManifest.xml to:

<manifest xmlns:android=""
  • Script changes are not accepted by repeated restart of the app

Try to click “Force Stop” in Settings → Applications

Displaying text in widget textview

set context [activity]  ;# an activity is a Android screen
set layout [linearlayout -new $context]
$layout setorientation VERTICAL ;# Note: view can be changed by click
set layoutparams [linearlayoutparams -new {FILL_PARENT WRAP_CONTENT}]

set tv [textview -new $context -text {Here is Password Gorilla for Android

First tests with text formatting

The text is set to green color and to italic style} -layoutparams $layoutparams ]

$tv setTypeface SERIF 2
$tv append "\n\tappend a line with a tab"
# $tv settext "" ;# clear screen
# for color definitions see:
$tv settextcolor -16711936

$layout addview $tv
[activity] setcontentview $layout

Here is a screenshot:

Screenshot according to commit: First GUI attempt: listview + menu (5d8e9ba690)

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.