Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant find OnProgressClickListener written in Java #5

Closed
Dor-Sloim opened this issue Nov 2, 2019 · 6 comments
Closed

Cant find OnProgressClickListener written in Java #5

Dor-Sloim opened this issue Nov 2, 2019 · 6 comments
Assignees

Comments

@Dor-Sloim
Copy link

Dor-Sloim commented Nov 2, 2019

Hi, is there an OnProgressClickListener written in Java ?(not the kotlin one)
If not, do you think you can add one so we will be able to do this:

`
progressView.setOnProgressClickListener(new OnProgressClickListener()
{

        @Override
        public void onClickProgress(boolean b)
        {
            Toast.makeText(MainActivity.this, progressView.getProgress() + "% selected: " + b, Toast.LENGTH_SHORT).show();
        }
    })

`

(Im coding in Java)
so im getting the error:

class file for kotlin.jvm.functions.Function1 not found

Thanks a lot.

@skydoves skydoves self-assigned this Nov 3, 2019
@skydoves
Copy link
Owner

@Dor-Sloim
Hi, it seems not has any problem setting onClickProgress a listener in Java like this.

progressView.setOnProgressClickListener(new OnProgressClickListener() {
      @Override
      public void onClickProgress(boolean b) {

      }
 });

@Dor-Sloim
Copy link
Author

Thanks for answering.
I copied your code but still getting the same error:

error: cannot access Function1
class file for kotlin.jvm.functions.Function1 not found

Do i have to enable kotlin support for the project for this to work?

@skydoves
Copy link
Owner

@Dor-Sloim
Hi, it is released a new version 1.0.5 now.
Thank you for your issue!

@Dor-Sloim
Copy link
Author

Updated to 1.0.5 but still got the same error.

@Dor-Sloim
Copy link
Author

Also, i'm getting the same error when using setOnProgressChangeListener.
The error:

error: cannot access Function1

class file for kotlin.jvm.functions.Function1 not found

The only working listener for me is the setOnClickListener(new View.OnClickListener().

Do you think you can add java support?
I really love this library.

@Dor-Sloim
Copy link
Author

I got this to work by configuring Kotlin for project unfortunately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants