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 i custumer android-collapse-calendar-view in a fragment?? #9

Open
xpatient opened this issue Sep 19, 2015 · 1 comment
Open

Comments

@xpatient
Copy link

i got error on ''mCalendarView(manager); '': this is my code

@OverRide
public View onCreateView(LayoutInflater inflater, @nullable ViewGroup container, @nullable Bundle savedInstanceState) {
return inflater.inflate(R.layout.activity_main, container, false);
}

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    initView();
}

private void initView(){
    CalendarManager manager = new CalendarManager(LocalDate.now(), CalendarManager.State.MONTH, LocalDate.now(), LocalDate.now().plusYears(1));

    mCalendarView = (CollapseCalendarView) getView().findViewById(R.id.calendar);
    mCalendarView(manager);
}

}

@fedchuk
Copy link

fedchuk commented Jan 26, 2017

Ti try

        CollapseCalendarView calendarView = (CollapseCalendarView) rootView.findViewById(R.id.calendar);
        calendarView.init(LocalDate.now(), LocalDate.now(), LocalDate.now().plusYears(1));

without CalendarManager in fragment

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