4

I'm trying to change the text colour of specific days in Android's CalendarView to mark days that have events.

I'm currently trying to do this by making a copy of Android's CalendarView.java and injecting my own code in relevant places, but am open to other solutions.

So far I've copied the source CalendarView.java file into my project from adt-bundle-windows-x86\sdk\sources\android-14\android\widget and I'm trying to get it to work within my project but there are a lot of problems with R.styleable such as

TypedArray attributesArray = context.obtainStyledAttributes(attrs, R.styleable.CalendarView,
                R.attr.calendarViewStyle, 0);
        mShowWeekNumber = attributesArray.getBoolean(R.styleable.CalendarView_showWeekNumber,
                DEFAULT_SHOW_WEEK_NUMBER);

There also seems to be a declaration missing for mContext. I've copied calendar_view.xml from adt-bundle-windows-x86\sdk\platforms\android-15\data\res\layout

Here are the errors that come up:

Description Resource    Path    Location    Type 
styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 369    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 368    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 374    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 371    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 362    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 359    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 366    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 364    Java Problem

calendar_view cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 400    Java Problem

mContext cannot be resolved CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 398    Java Problem

mContext cannot be resolved to a variable   CalendarView.java    /LoginActivity/src/uk/ac/bris/newtouch/newplan line 1095   Java Problem

com.android.internal.R cannot be resolved to a variable CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 404    Java Problem

list cannot be resolved or is not a field   CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 403    Java Problem

mContext cannot be resolved to a variable   CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 739    Java Problem

com.android.internal.R cannot be resolved to a variable CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 376    Java Problem

TextAppearance_Small cannot be resolved or is not a field   CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 374    Java Problem

com.android.internal.R cannot be resolved to a variable CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 405    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 382    Java Problem

mContext cannot be resolved to a variable   CalendarView.java    /LoginActivity/src/uk/ac/bris/newtouch/newplan line 1035   Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 378    Java Problem

mContext cannot be resolved to a variable   CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 1034   Java Problem

error: Error: Resource is not public. (at 'id' with value '@+android:id/month_name').   calendar_view.xml   /LoginActivity/res/layout   line 25 Android AAPT Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 346    Java Problem

LocaleData cannot be resolved   CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 347    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 348    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 352    Java Problem

error: Error: Resource is not public. (at 'id' with value '@+android:id/day_names').    calendar_view.xml   /LoginActivity/res/layout   line 33 Android AAPT Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 342    Java Problem

calendarViewStyle cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 343    Java Problem

styleable cannot be resolved or is not a field  CalendarView.java   /LoginActivity/src/uk/ac/bris/newtouch/newplan  line 344    Java Problem

0 Answers0