Hello, I am trying to create a very simple program that will change the text of a label object when I click a button. I have created the button and the label using the XML file, but now I have no idea how I can write the callback when the user presses the button. I tried reading the help file that's in the developer documentation (http:// code.google.com/android/devel/ui/notifications.html) but I found it to be very unhelpful. Can someone help me out here?
My main code looks like this: __________________________________ package com.xandem.gossamer; import android.app.Activity; import android.os.Bundle; public class gossamer extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }; __________________________________ and my XML file is this: __________________________________ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Button id="@+id/gossamerBut" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/buttonText" android:gravity="center" android:layout_margin="20px" android:textSize="15pt" /> <TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/defaultAnswer" android:gravity="center" android:layout_margin="20px" /> </LinearLayout> __________________________________ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---