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 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