help on Android

by Billsen » Fri, 27 Jun 2008 07:48:50 GMT

Sponsored Links

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) {


public void listCompany(){
                Intent i = new Intent(this,ListCompany.class);

In class ListCompany, I have code like this,

 public void onCreate(Bundle icicle) {

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?




help on Android

by Mark Murphy » Fri, 27 Jun 2008 08:20:38 GMT


You should probably look at the stack trace (e.g., via adb logcat) to 
see where exactly you got the exception. That may help you determine if 
the problem is with CompantMenu or with ListCompany and may give you a 
clue as to what pointer is null.

Mark Murphy (a Commons Guy) 
Warescription: All titles, revisions, & ebook formats, just $35/year


Sponsored Links

help on Android

by Juven Xu » Fri, 27 Jun 2008 11:56:11 GMT

 please paste the stack trace to help figure out the root cause


Other Threads

1. Camera Preview on Emulator

I want to preview my camera on emulator. I have also written small app for
that. But it only show black and white squares and gray square moving. Does
anybody has any idea about this ?

Thanks in advance,


2. PMEM cache flush operation

I am working on PMEM sharing between opencore and surfaceflinger in Android
1.5. I find that PMEM can be configured to be cacheable but there is no
corresponding cache flush ioctl for this device.

Since PMEM is the dedicated physical memory for android, there can be cases
that a software video unit wants to share YUV buffer without extra copy with
hardware GPU inside surfaceflinger. For SW video unit, it is unacceptable to
configure PMEM to be non-cacheable as there would definitely be huge
performance downgrade.

Any thoughts on this?



3. How to load recovery.img on Android and where is the location of boodloader control block (BBC)

4. whether the latest ANDROID supports armv4

5. Is it possible to access an Android managed service(i.e remotable

6. How to add a new application to the cupcake source code?

7. How to load recovery.img on Android and where is the location of boadloader control block (BBC)