leandroBorgesFerreira / LoadingButtonAndroid

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

Use .png as background #64

Closed tinkooladik closed 5 years ago

tinkooladik commented 6 years ago

Is it possible to use .png or VectorDrawable as button background? When I try to do so, it looks like this: bcb3bf31-7b48-4f89-86fb-f294a4db5de7

even though corner angle was specified:

        circular:finalCornerAngle="50dp"
        circular:initialCornerAngle="0dp" // also tried "50dp"

Can I make it round circular after calling .startAnimation(); and then return back to rectangular shape after .revertAnimation(); ?

BTW done state also looks strange: 94f1db19-7f84-4b89-9ae0-b6d2d78a5c97

tinkooladik commented 6 years ago

It worked in this way for couple of days and now it fails with java.lang.RuntimeException: Error reading background... Use a shape or a color in xml!

So it seems I can't use .png / VectorDrawable

leandroBorgesFerreira commented 5 years ago

Yes, sorry. You can't. This button only accepts solid colors

leandroBorgesFerreira commented 5 years ago

It is not possible to improve this library to accept .png because the only drawable that works with the morphing animation if the GradientDrawable.

Since this problem can't be fixed, I am closing the issue. Please fell free to reopen it if you think there's a way to fix it.