Java Android - Aide Error : There is no applicable contructor to '()' -


i got error

there no applicable contructor "()"

in aide ,

here code, think there no error, got error, how fix it?

   public class togglerd extends radiobutton {     // implement necessary constructors      @override     public void toggle() {         if(ischecked()) {             if(getparent() instanceof radiogroup) {                 ((radiogroup)getparent()).clearcheck();             }         } else {             setchecked(true);         }     } } 

if check docs radiobutton see offers 4 constructors, none without arguments. way got extending view in android creating private method (call sharedconstructor or whatever) , call in each of constructors. this:

public class togglerd extends radiobutton { // implement necessary constructors  public togglerd(context context) {     super(context); } public togglerd(context context, attributeset attrs) {     super(context, attrs); } public togglerd(context context, attributeset attrs, int defstyleattr) {     super(context, attrs, defstyleattr); }  @override public void toggle() {     if(ischecked()) {         if(getparent() instanceof radiogroup) {             ((radiogroup)getparent()).clearcheck();         }     } else {         setchecked(true);     } } 

}

since don't override constructor go ahead , call super.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -