]>
iEval git - unical.git/blob - ieval/unical/AddEventTabListener.java
1 package ro
.ieval
.unical
;
3 import android
.app
.ActionBar
;
4 import android
.app
.ActionBar
.Tab
;
5 import android
.app
.Fragment
;
6 import android
.app
.FragmentTransaction
;
8 import java
.text
.ParseException
;
9 import java
.text
.SimpleDateFormat
;
10 import java
.util
.Date
;
12 public class AddEventTabListener
implements ActionBar
.TabListener
{
13 public Fragment fragment
;
17 public AddEventTabListener(final Fragment fragment
,Event e
,int tabId
) {
18 this.fragment
= fragment
;
24 public void onTabSelected(final Tab tab
, final FragmentTransaction ft
) {
25 ft
.replace(R
.id
.fragment_container
, fragment
);
29 public void onTabUnselected(final Tab tab
, final FragmentTransaction ft
) {
32 ev
.title
=fragment
.getView().findViewById(R
.id
.eventtitle
).toString();
33 String start
=fragment
.getView().findViewById(R
.id
.date_start
).toString()+ " " +
34 fragment
.getView().findViewById(R
.id
.time_start
).toString();
35 String end
=fragment
.getView().findViewById(R
.id
.date_end
).toString()+ " " +
36 fragment
.getView().findViewById(R
.id
.time_end
).toString();
38 Date s
=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(start
);
39 Date e
=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(end
);
40 ev
.dtstart
=s
.getTime();
42 } catch (ParseException e
) {
43 e
.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
48 ev
.description
=fragment
.getView().findViewById(R
.id
.description
).toString();
57 public void onTabReselected(final Tab tab
, final FragmentTransaction ft
) {
58 // TODO Auto-generated method stub
This page took 0.046382 seconds and 4 git commands to generate.