Calendar date = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd");
curDate = sdf.format(date.getTime());
我在onCreate方法裏面做了上面的代碼。但它只能返回當前日期。我想要的是在日曆中選擇的日期。如何在Android中的CalenderView中獲取選定的日期?
<CalendarView
android:id="@+id/calendarView1"
android:layout_width="match_parent"
android:layout_height="match_parent" />
請幫我
讀取文檔,存在CalendarView一個GETDATE方法。你的代碼是關於日曆的,如果你閱讀文檔,你會看到完全不同的類。 – njzk2