razir / ProgressButton

Android Progress Button
856 stars 77 forks source link

JAVA Usage? #14

Closed omkar-tenkale closed 4 years ago

omkar-tenkale commented 4 years ago

I have imported the library in my android project written in java. But i couldn't use bindProgressButton(myButton);

is it possible to use this library in java?

marekx commented 4 years ago

When calling kotlin fun from java you can use: com.github.razir.progressbutton.ProgressButtonHolderKt.bindProgressButton(activity, button); activity should implement a LifecycleOwner, when using a support library with version 26.1.0 or higher the interface is allready implemented as stated in: https://developer.android.com/topic/libraries/architecture/lifecycle#implementing-lco

razir commented 4 years ago

Big thanks to @JcMinarro, you can now find samples here. Make sure you update the library version >= 2.1.0