package com.andrexx.hellorexxla import android.app.Activity import android.os.Bundle import android.widget. import android.view. class helloRexxLA extends Activity implements View.onClickListener tv = TextView -- make a link for our text /** Called when the activity is first created. */ method onCreate(savedInstanceState=Bundle ) super.onCreate(savedInstanceState) tv = TextView(this) -- create a text field tv.setText("Android program written in NetRexx for RexxLA Symposium 2011") -- add some text tv.setTextSize(1,25.0) -- upsize the text nb=android.widget.Button(this) -- create a button nb.setText("press me") -- add some text to the button nb.setOnClickListener(this) -- add a listener method to the button (requires implements View.onClickListener and onClick method) mylayout=LinearLayout(this) -- create a graphical object container (called a layout in Android terms - these are normally defined using XML, see main.xml in res\layout dir) mylayout.addView(nb) -- add our button to the layout mylayout.addView(tv) -- add our text field to the layout setContentView(mylayout) -- display the layout on the screen method onClick(v=View) -- this method will be called when the button is clicked, v is the button (all Android graphical objects descend from View) tv.setText("You clicked me!") -- change the text in our text field