일단 에러로그중 일부입니다....
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: Process: com.ourincheon.smartcampus1231, PID: 758
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setBackgroundColor(int)' on a null object reference
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: at com.ourincheon.smartcampus1231.haksa.CalendarView.drawCalendar(CalendarView.java:90)
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: at com.ourincheon.smartcampus1231.haksa.CalendarView.init(CalendarView.java:62)CampusAsyncTaskNodialog.java:31)
01-27 04:33:29.245 758-1348/com.ourincheon.smartcampus1231 E/AndroidRuntime: at com.ourincheon.smartcampus1231.util.SmartCampusAsyncTaskNodialog.doInBackground(SmartCampusAsyncTaskNodialog.java:10)
java.lang.Thread.run(Thread.java:818)
그리고 CalenderView.java 중 일부
public class CalendarView extends LinearLayout {
public void drawCalendar() {
for (int i = 0; i < mItems.size(); i++) {
int curRowPosition = (int) i / 7;
int date[] = adapter.getDate(i);
if (i % 7 == 0) {
LinearLayout row = new LinearLayout(context);
row = (LinearLayout) inflater.inflate(R.layout.calendar_item,
null);
this.addView(row);
rows.add(row);
}
int dayId = getResources().getIdentifier(
"id/day" + Integer.toString(i - curRowPosition * 7), "id",
"com.appcenter.smartcampus");
int barsId = getResources().getIdentifier(
"id/bar" + Integer.toString(i - curRowPosition * 7), "id",
"com.appcenter.smartcampus");
TextView day = (TextView) rows.get(curRowPosition).findViewById(
dayId);
LinearLayout barLayout = (LinearLayout) rows.get(curRowPosition)
.findViewById(barsId);
day.setTextColor(Color.rgb(102, 102, 102));
if (date == null) {
day.setBackgroundColor(Color.rgb(160, 160, 160));
day.setTextColor(Color.WHITE);
if (i % 7 == 0)
day.setBackgroundColor(Color.rgb(245, 149, 115));
if ((i + 1) % 7 == 0)
day.setBackgroundColor(Color.rgb(142, 141, 177));
barLayout.setVisibility(View.GONE);
} else {
if (date[1] != month) {
if (i % 7 == 0)
day.setTextColor(Color.argb(175, 245, 149, 115));
else if ((i + 1) % 7 == 0)
day.setTextColor(Color.argb(175, 142, 141, 177));
else
day.setTextColor(Color.argb(175, 160, 160, 160));
}
else if (i % 7 == 0)
day.setTextColor(Color.rgb(245, 149, 115));
else if ((i + 1) % 7 == 0)
day.setTextColor(Color.rgb(142, 141, 177));
else
day.setTextColor(Color.rgb(102, 102, 102));
}
}
}
도와주세요....