-
Notifications
You must be signed in to change notification settings - Fork 526
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
setMonthScrollListener in Java #74
Comments
My problem got fixed when I configured Kotlin compiler and runtime for my Java module with the latest stable version (currently 1.3.50) Just go to Tools > Kotlin > Configure Kotlin in Project > Android with Gradle and choose your Java module with Single module radio button selected then select your version and OK. |
Hi @rejsiperpalaj, I just configured kotlin in project, would you please send your code snippet where you use setMonthScrollListener? |
@hulisani-mudimeli Note that with newer versions of Android Studio, you do not need to configure Kotlin in the project as described above. After you have added the Calendar library dependency, the scroll listener Java code should look like this: calendarView.setMonthScrollListener(new Function1<CalendarMonth, Unit>() {
@Override
public Unit invoke(CalendarMonth calendarMonth) {
// Use calendarMonth
return Unit.INSTANCE;
}
}); Or shorter: calendarView.setMonthScrollListener(calendarMonth -> {
// Use calendarMonth
return Unit.INSTANCE;
}); |
I want to call this listener in java class. How can i do that?
The text was updated successfully, but these errors were encountered: