Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

how to set different color for labels #29

Open
ghost opened this issue Nov 5, 2018 · 0 comments
Open

how to set different color for labels #29

ghost opened this issue Nov 5, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 5, 2018

i wanna to change labels in different days but the application crash

mCalendarView.setDateLabelAdapter(new MonthView.DateLabelAdapter() {
@OverRide
public CharSequence getLabel(Calendar calendar, int index) {
if (calendar.get(Calendar.DATE) == 5) {
mCalendarView.getTimelineView().setLabelColor(getResources().getColor(R.color.red_50));

                return "busy";
            }else
                return Integer.toString(calendar.get(Calendar.MONTH) + 1) + "/" + 
                           (calendar.get(Calendar.YEAR) % 2000);
        }
    });
    mCalendarView.getTimelineView().getAdapter().notifyDataSetChanged();
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants