ExtendedCalendarView icon indicating copy to clipboard operation
ExtendedCalendarView copied to clipboard

Change the first day of the week please

Open Copper087 opened this issue 10 years ago • 1 comments

Hi man !!

I've tried with no success show Monday - Sunday week order instead of Sunday - Saturday. I'm new in Android and that is difficult for me.

I think it could be a good feature to implement in your custom calendar, lots of countries starts their week on Monday :)

Bye and thanks for your awesome calendar!!

Copper087 avatar Aug 13 '14 10:08 Copper087

After have tried changing everything i got it!! but it was no complex at all! It was ridiculously easy!!

CalendarAdapter class:

1.- Change static variable "FIRST_DAY_OF_WEEK = 0" to = 1 2.- Change this part of getView() method (uncomment code instead of comment code) :

                if(position == 0){
            //day.setText(R.string.sunday);
            day.setText(R.string.monday);
        }else if(position == 1){
            //day.setText(R.string.monday);
            day.setText(R.string.tuesday);
        }else if(position == 2){
            //day.setText(R.string.tuesday);
            day.setText(R.string.wednesday);
        }else if(position == 3){
            //day.setText(R.string.wednesday);
            day.setText(R.string.thursday);
        }else if(position == 4){
            //day.setText(R.string.thursday);
            day.setText(R.string.friday);
        }else if(position == 5){
            //day.setText(R.string.friday);
            day.setText(R.string.saturday);
        }else if(position == 6){
            //day.setText(R.string.saturday);
            day.setText(R.string.sunday);
        }

Copper087 avatar Aug 14 '14 09:08 Copper087