Hi,
I am a new comer to Android and need a help. Here is my question? How
to get to a new activity by clicking a button.
What is what I did.
In class CompantMenu, I have code like this
.........
.........
listButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
listCompany();
}
});
.........
.........
public void listCompany(){
Intent i = new Intent(this,ListCompany.class);
startActivity(i);
}
In class ListCompany, I have code like this,
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.list_company);
}
Node:list_company.xml is availabe and classes ListCompany CompantMenu
are in AndroidManifest.xml.
When I lick listButton, I did not get page defined by list_company,
instead, I got java.long.NullPointerException.
How solve this issue?
Thanks
Billsen
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---