This one took me a long time to figure out, so I thought I'd share it.
I have a custom View in the same package as my Activity, and the View
was a package private (the default access - no access modifier) class.
There wasn't anything in the log about not being able to create this
class, but calling findViewById on its id returned null. Changing the
access modifier on the class worked - now findViewById returns the
view.

For clarity, I had something like:
    class MyView extends View {...}
changing it to
    public class MyView extends View {...}
got around the problem of Activity.findViewById(int) returning null.

-Craig
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to