Hi, all,
I am writing an application which one of the activity has a button and
use this button to switch to another activity when clicking that. The
main activity implements the onCreate and OnClickListener as follows:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
startButton = (Button) findViewById(R.id.start_button);
startButton.setOnClickListener(mVideoListener);
}
private OnClickListener mVideoListener = new OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
WriteFile();
Intent intent = new
Intent(RatingPlayer.this.getApplication(),
Inplayer.class);
startActivity(intent);
}
};
When I try to run this program on my emulator, after hitting the
button, the program stopped unexpectedly. I follow the instructions of
implementing OnClickListener firmly so I don't know what's the problem
in my implementation.
Thanks in advance.
Aki
--
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
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.