4

AndroidのCalendarViewで特定の日のテキストの色を変更して、イベントのある日をマークしようとしています。

私は現在、AndroidのCalendarView.javaのコピーを作成し、関連する場所に独自のコードを挿入することでこれを実行しようとしていますが、他のソリューションを利用できます。

これまでのところ、ソースCalendarView.javaファイルをからプロジェクトにコピーし、プロジェクトadt-bundle-windows-x86\sdk\sources\android-14\android\widget内で機能させようとしていますが、R.styleableには次のような多くの問題があります。

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

mContextの宣言が欠落しているようです。からcalendar_view.xmlをコピーしましたadt-bundle-windows-x86\sdk\platforms\android-15\data\res\layout

発生するエラーは次のとおりです。

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
4

0 に答える 0