I have modified your code ..check and run it now
Thanks and Regards
Abdul Waheed
http://waheedtechblog.blogspot.com
-----Original Message-----
From: Dubler
Sent: 30/08/2011 13:32:50
Subject: [android-developers] Crash after adding buttons
Hi, always when i add a button, there is crash and no informations
why... that is my code:
package org.me.nauka3;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class Nauka3Activity extends Activity {
private Button closeButton;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
closeButton = (Button).findViewById(R.id.button1);
closeButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
}
}
what's wrong????
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en