calendar.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<org.androidtown.calendarmemo.CalendarMonthView
android:id="@+id/monthView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchMode="columnWidth"
android:background="#dcdbdb"
/>
</LinearLayout>
- Mk_Calendar
private void init(Context context, CalendarMonthAdapter adapter){
mContext = context;
// inflate XML layout
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
inflater.inflate(R.layout.calendar, null);
/*monthView = (CalendarMonthView) findViewById(R.id.monthView);
monthViewAdapter = adapter;
monthView.setAdapter(monthViewAdapter);*/
// 리스너 설정
/* monthView.setOnDataSelectionListener(new OnDataSelectionListener() {
public void onDataSelected(AdapterView parent, View v, int position, long id) {
// 현재 선택한 일자 정보 표시
MonthItem curItem = (MonthItem) monthViewAdapter.getItem(position);
int day = curItem.getDay();
Log.d("MainActivity", "Selected : " + day);
}
});*/
}
calendar.xml을 인플레이트 시키려고하는데
inflater.inflate(R.layout.calendar, null);
위 부분에서 에러가 뜨내요 ㅜ
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.androidtown.calendar.month, PID: 27023
android.view.InflateException: Binary XML file line #6: Binary XML file line #6: Error inflating class org.androidtown.calendarmemo.CalendarMonthView
org.androidtown.calendarmemo.CalendarMonthView
는 Custom GridView입니다.
문제가 뭐일까요.. 그리고 해결방법은 어떻게해야될까요...
감사합니다.