to post text on the screen you can make a text view and then call setText("").
for events, you need to add an event handler. lets use a button for example:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout androidrientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:id="@+id/Button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="clickme"
/>
</LinearLayout>
public class yourApp extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button Button1 = (Button) findViewById(R.id.Button1);
Button1.setOnClickListener(button1ClickEvent);
}
// Button events
private OnClickListener button1ClickEvent = new OnClickListener()
{
public void onClick(View v)
{
// handle click
}
};
}

Reply With Quote
rientation="vertical"
Bookmarks