+ public void onTabUnselected(final Tab tab, final FragmentTransaction ft) {
+ switch (tabId) {
+ case 0:
+ ev.title=fragment.getView().findViewById(R.id.eventtitle).toString();
+ String start=fragment.getView().findViewById(R.id.date_start).toString()+ " " +
+ fragment.getView().findViewById(R.id.time_start).toString();
+ String end=fragment.getView().findViewById(R.id.date_end).toString()+ " " +
+ fragment.getView().findViewById(R.id.time_end).toString();
+ try {
+ Date s=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(start);
+ Date e=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(end);
+ ev.dtstart=s.getTime();
+ ev.dtend=s.getTime();
+ } catch (ParseException e) {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+
+ break;
+ case 1:
+ ev.description=fragment.getView().findViewById(R.id.description).toString();
+ break;
+ case 2:
+ break;
+ }