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

How can we manually trigger expand or collapse calendarView #8

Open
aftabsikander opened this issue Aug 18, 2015 · 1 comment
Open

Comments

@aftabsikander
Copy link

I am unable to find any function which can help me manually trigger expand or collapse view. I looked at the source code. I believe Resize manager is the main class which handles expand or collapse functionality. And it take touch events to trigger the function. Can you by pass the touch function to achieve this functionality.

@tuckercr
Copy link

tuckercr commented Nov 9, 2016

This was my attempt to close the monthly view when a date is selected, but for some weird reason it only works every other time. Still trying to figure out why.

 mCalendarView.setListener(new CollapseCalendarView.OnDateSelect() {
        @Override
        public void onDateSelected(LocalDate date) {

            if (mCalendarView.getManager() != null) {

                CalendarManager.State state = mCalendarView.getManager().getState();

                if (state == CalendarManager.State.MONTH) {
                    mCalendarView.getManager().toggleView();
                }
            }
        }
 });

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