leandroBorgesFerreira / LoadingButtonAndroid

A button to substitute the ProgressDialog
MIT License
1.94k stars 214 forks source link

Change Button Color Programmatically #161

Open rtsketo opened 4 years ago

rtsketo commented 4 years ago

Is it possible to change the color of the button programmatically?

Providing a drawable as background makes initalCorner and finalCorner to be ignored.

leandroBorgesFerreira commented 3 years ago

Did you use shape or selector in the drawable? This library has a bug with shape =|. Wrap you shape inside a selector and it should be fine.

Pei116 commented 2 years ago

It used to work before but recently I found it's no longer showing loading animation properly (button is still in rectangular shape) when used with background. And the solution to that is wrapping by selector in drawable and use that in background instead of raw color, as mentioned by the author.