question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reset Horizontal-Calendar settings

See original GitHub issue

I want to reinitialize the HorizontalCalendar every time I select Spinner item.

But I get below error: java.lang.IllegalStateException: An instance of OnFlingListener already set.

For following code :

 sp_bkapt_select_pgm.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
                System.out.println("I m setSpinner : " + adapterView.getItemAtPosition(i));

    horizontalCalendar_viewSch = new HorizontalCalendar.Builder(Activity_ViewAppointmentsSchedule.this, R.id.horizontalCalendar_viewSch)
                                .startDate(actualStrtDate)
                                .endDate(endDate)
                                .datesNumberOnScreen(5)
                                .dayNameFormat("EEE")
                                .dayNumberFormat("dd")
                                .monthFormat("MMM")
                                .showDayName(true)
                                .showMonthName(true)
                                .defaultSelectedDate(strtDate)
                                .textColor(Color.parseColor("#191919"), Color.WHITE)
                                .build();       


            }

            @Override
            public void onNothingSelected(AdapterView<?> adapterView) {

            }
        });

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
muraeecommented, Jul 18, 2017

Hello @AshaChaparalal,

This is perfectly a valid use case, but unfortunately it is not supported at the moment, I will be adding it for sure in the next version.

Regards.

1reaction
Danish1111commented, Mar 3, 2018

I am getting this issue java.lang.IllegalStateException: An instance of OnFlingListener already set.
when i am initializing my horizontalCalendar in fragment. Please explain how to solve it step by step

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reset Horizontal-Calendar settings · Issue #23 - GitHub
I want to reinitialize the HorizontalCalendar every time I select Spinner item. But I get below error: java.lang.
Read more >
HorizontalCalendarView available date Color change
In my project I'm using this library to view my calendar. In this horizontal calendar library provide to change the text color(DefaultColor ...
Read more >
Horizontal CalendarView in Android - GeeksforGeeks
Most of the apps prefer to use Horizontal Calendar View inside their which looks better than the normal calendar. In this article, we...
Read more >
huzaifa0024 / Horizontal-Calendar Download - JitPack
A material horizontal calendar view for Android based on RecyclerView ... To listen to date change events you need to set a listener:...
Read more >
HorizontalCalendar on CocoaPods.org
Horizontal scrollable calendar for week view just like on iOS calendar. ... Horizontal Calendar is a great way to show schedules for mobile...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found