On 2/1/2012 4:11 AM, atcal wrote:
I'm trying to define my own View subclass.

public class myView extends View {

     myView(Context context) {
         View(context);
     }
}

Eclipse flags the first line of my constructor with an error "Implicit
super conctructor View() is undefined. Must explicitly invoke another
constructor" and the second line is flagged with the error "The method
View(Context context) is undefined for the type myView."

What does all this mean? The android documentation shows the
constructor View(Context context) as public. Why can't I use it?

There are several reasons why View() is not available and will never be available.

It means you don't understand class instantiation and the life cycle of a class. This is not an Android issue at all and I suggest that you spend some time learning Java fundamentals. These folks are generally pretty helpful with that http://www.javaranch.com/


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