Hey everyone, thanks for taking the time time to reply. It really is
appreciated!
Implementing my initialization in onCreate() worked, fantastic stuff.
Thanks again
Mark
On 11 March 2011 06:17, Dianne Hackborn hack...@android.com wrote:
Don't implement a constructor and do stuff in it.
I was playing around with the galleryview and image switcher, and I decided
to implement a textview that describes my images as I scroll through them. I
created a string array, and added a text view in my layout xml. I then added
the string and textview to my code. I thought I could reuse the
On Thu, Mar 10, 2011 at 8:25 PM, Mark Sharpley m.c.sharp...@gmail.comwrote:
However, this addition causes my app to force close when I try to run it.
03-11 02:00:59.288: ERROR/AndroidRuntime(12636): Caused by:
java.lang.NullPointerException
03-11 02:00:59.288: ERROR/AndroidRuntime(12636):
Line 36:
Resources res = getResources();
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Line 36:
Resources res = getResources();
(Copying from the new thread - not sure why that happened).
Did you mean to call getResources(); *outside* of onCreate?
-
TreKing
Don't implement a constructor and do stuff in it. Implement your
initialization in onCreate().
On Thu, Mar 10, 2011 at 6:25 PM, Mark Sharpley m.c.sharp...@gmail.comwrote:
I was playing around with the galleryview and image switcher, and I decided
to implement a textview that describes my
6 matches
Mail list logo