Thanks for the response, Cyril. Is this how I would do it? I'm still not
seeing any text feedback on the screen when I click the button.
package test.app;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
public class test_app extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
/* Find the button from our XML-layout. */
Button b = (Button)this.findViewById(R.id.btn_open_search);
b.setOnClickListener(new OnClickListener() {
public void onClick(View agr0) {
// Place code to handle button click here
String TAG = "TAG";
Log.i(TAG, "Button clicked");
}
});
}
}
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Cyril Jaquier
Sent: Sunday, January 04, 2009 10:57 AM
To: [email protected]
Subject: [android-beginners] Re: notification
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Is there a different way I should be doing this than using
> system.out.println()? Any suggestions are welcome. Thanks.
>
Use Log: http://code.google.com/android/reference/android/util/Log.html
Regards,
Cyril
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklg6lIACgkQlYy8cEwUMaSvuACgjO2UM/dljb2mToRBRFwpajlz
JhgAnjx2qGVCZFBr8A2lmaQnV+2ZwnU7
=pfa7
-----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---