You cannot use these fields unless you build your application along with the full Android application build. Although these fields are protected in code, they're pseudo-private after compilation (see @hide annotation).
-- Happy Hacking, Gaurav Vaish www.mastergaurav.com ------------------------------ On Apr 19, 4:12 pm, Pavel Khlustikov <[email protected]> wrote: > Hi, > > I'm implementing custom widget exdending a View class. But I've found that > View's protected field (e.g. mLeft) is not accessible from subClass: > > import android.content.Context; > import android.view.View; > > public class MyView extends View { > > public MyView(Context context) { > super(context); > init(); > > } > > private void init() { > *mLeft* =1; // eclipse says here "mLeft cannot be resolved" > } > > } > > Of couse, instead of mLeft I can use getLeft(). But what will I do if some > protected field doesnt have a getter (like mGroupFlags in ViewGroup)? > > Maybe something wrong with my Eclipse setting? > > Please, help > > Thanks, > Pavel > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" 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 > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en

