2011-02-24 2 views

답변

4

확인이 아웃 : http://www.developer.com/ws/article.php/3850276/Working-with-the-Android-Calendar.htm

편집 : 온 클릭 메소드에 코드를 추가 버튼 클릭 이벤트에서 일정을 열려면

:

Intent i = new Intent(); 

//Froyo or greater (mind you I just tested this on CM7 and the less than froyo one worked so it depends on the phone...) 
cn = new ComponentName("com.google.android.calendar", "com.android.calendar.LaunchActivity"); 

//less than Froyo 
cn = new ComponentName("com.android.calendar", "com.android.calendar.LaunchActivity"); 

i.setComponent(cn); 
startActivity(i); 
+0

안녕하세요, Evilone Thx. 그것이 Button Click ..에서 구현되는 방법? –

+0

나는 이미 그것을 사용했다. 그러나 가장 중요한 작업을 추가하는 오류가 발생했습니다. –

+0

@evilone : 이것은 문서화되지 않았고 지원되지 않으며 신뢰할 수없는 솔루션입니다. 이 애플리케이션은 모든 기기에 존재하지 않으며, 본 것처럼 Google은 사용 방법을 변경합니다. – CommonsWare

0

의 CalendarView 위젯을 사용해보십시오 참조 문서 here

이것은 대화 상자가 아니므로 대화 상자를 만들어서 CalendarView로 감싸고 직접 실행해야합니다.

+0

CalendarView 위젯을 래핑하는 것과 동일한 방법으로 android.app.AlertDialog를 확장하고 [documentation] (http : //developer.android.com/reference/android/app/AlertDialog.html)보기에 사용자 정의 레이아웃을 추가하는 방법은 AlertDialog를 참조하십시오. –

+0

안녕하세요, James Booker 님의 회신에 감사드립니다. –

+2

캘린더 뷰는 API 레벨 11 이후입니다 ... –

관련 문제