MaterialDesignLibrary icon indicating copy to clipboard operation
MaterialDesignLibrary copied to clipboard

NullPointerException with ButtonRectangle when setText() invoked

Open Evanfor1990 opened this issue 10 years ago • 4 comments

ButtonRectangle doesn't override this method defined in Button,and both class has instance variable "textButton" . The Button's textButton is null when using ButtonRectangle. Did I think right?

Evanfor1990 avatar Aug 30 '15 02:08 Evanfor1990

I have the same problem and I fixed it with this:

@Override
public void setText(String text){
    textButton.setText(text);
}

HectorFGarcia avatar Aug 31 '15 15:08 HectorFGarcia

Thanks,I deleted textButton in ButtonRectangle

Evanfor1990 avatar Aug 31 '15 16:08 Evanfor1990

I've made changes, fixing some issue,

  • SetText Button programmatically
  • conflict error ""Error:Attribute "rippleColor" has already been defined"" which occurs when you use Material Design Library

Adding some features

  • ImageButtonFlat
  • ImageButtonFloat
  • ButtonFlatVertical

Have a look at https://github.com/Hallaz/MaterialDesignLibrary

Hallaz avatar Oct 26 '15 14:10 Hallaz

I'm getting the same errors. Will this be fixed or should I use the less recent library (i. e. the fork Hallaz mentioned)?

renatobellotti avatar Aug 17 '17 09:08 renatobellotti