I'm trying to extend Button class to get OnClick listener (Going to create wrapper for click listener)
public class ExtendedButton extends Button { public ExtendedButton(Context context) { super(context); } public ExtendedButton(Context context, AttributeSet attrs) { super(context, attrs); } public ExtendedButton(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } OnClickListener getOnClickListener(){ return this.mOnClickListener; } } But compiler in eclipse don't allow to do it. error: mOnClickListener connot be resolved or is not a field. View source code: /** * Listener used to dispatch click events. * This field should be made private, so it is hidden from the SDK. * [EMAIL PROTECTED] */ protected OnClickListener mOnClickListener; So I should have full access to this field from my class. I can get access to this fields with reflection but standard java inheritance mechanism don't work. Can anybody explain this problem? Why java source code don't redistributed with sdk? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---