[android-developers] Re: Launch the WebBrowser with intent with a Button gives NullPointer Exception

2009-08-22 Thread Mark Murphy
Tobias Eisentraeger wrote: Hello, I have trouble launching the WebBrowser with an Intent with a Button Click. I try doing this in the onCreate Method of my Activity: final Button getTheButtonBtn = (Button) this.findViewById(R.id.ButtonTheButton); getTheButtonBtn.setOnClickListener(new

[android-developers] Re: Launch the WebBrowser with intent with a Button gives NullPointer Exception

2009-08-22 Thread Tobias Eisentraeger
Hello Mark, thanks for looking into that with me. The problem is the Button Object which does not get instantiated correctly, i guess this is what null is. i can let it crash now like this: theButtonBtn = (Button) findViewById(R.id.ButtonTheButton); Log.d(EditYourSettings,Before accessing ID);

[android-developers] Re: Launch the WebBrowser with intent with a Button gives NullPointer Exception

2009-08-22 Thread Mark Murphy
Tobias Eisentraeger wrote: Hello Mark, thanks for looking into that with me. The problem is the Button Object which does not get instantiated correctly, i guess this is what null is. i can let it crash now like this: theButtonBtn = (Button) findViewById(R.id.ButtonTheButton);

[android-developers] Re: Launch the WebBrowser with intent with a Button gives NullPointer Exception

2009-08-22 Thread Tobias Eisentraeger
Mark, That was it, i called findViewById() before calling setContentView() , thank you so much. Toby On Sat, Aug 22, 2009 at 11:02 AM, Mark Murphy mmur...@commonsware.comwrote: Tobias Eisentraeger wrote: Hello Mark, thanks for looking into that with me. The problem is the Button