On Mar 10, 8:48 am, "jusun...@gmail.com" <jusun...@gmail.com> wrote:
> the result log mean that I can't accessed the protected variable
> mInLayout from outside package. I think I can access a parent's
> protected variable when extending class in Object oriented
> programming theory. am I wrong? and is there a good solution to access
> a parent's protected variable?

You're correct that a subclass can access its parent's protected
variables, but if you look at the AdapterView source:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/widget/AdapterView.java;h=173e80f54f75ee3051ac8e774ce18b4c9338eea8;hb=HEAD

you can see that mInLayout isn't actually protected, it has default
(package) visibility. I'm not sure what the solution is for your
particular problem.

--
Jon

--~--~---------~--~----~------------~-------~--~----~
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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to