]>
iEval git - unical.git/blob - src/ro/ieval/unical/AddEventTabListener.java
e9b840f2927bff57ead35b411887e3e39653b321
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
;
7 import android
.widget
.EditText
;
8 import android
.widget
.TextView
;
10 import java
.text
.ParseException
;
11 import java
.text
.SimpleDateFormat
;
12 import java
.util
.Date
;
14 public class AddEventTabListener
implements ActionBar
.TabListener
{
15 private Fragment fragment
;
17 private boolean isAdded
= false;
20 public AddEventTabListener(final Fragment fragment
,Event e
,int tabId
) {
21 this.fragment
= fragment
;
27 public void onTabSelected(final Tab tab
, final FragmentTransaction ft
) {
32 ft
.add(android
.R
.id
.content
, fragment
);
37 public void onTabUnselected(final Tab tab
, final FragmentTransaction ft
) {
40 ev
.title
=fragment
.getView().findViewById(R
.id
.eventtitle
).toString();
41 String start
=fragment
.getView().findViewById(R
.id
.date_start
).toString()+ " " +
42 fragment
.getView().findViewById(R
.id
.time_start
).toString();
43 String end
=fragment
.getView().findViewById(R
.id
.date_end
).toString()+ " " +
44 fragment
.getView().findViewById(R
.id
.time_end
).toString();
46 Date s
=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(start
);
47 Date e
=new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(end
);
48 ev
.dtstart
=s
.getTime();
50 } catch (ParseException e
) {
56 ev
.description
=fragment
.getView().findViewById(R
.id
.description
).toString();
65 public void onTabReselected(final Tab tab
, final FragmentTransaction ft
) {
This page took 0.046431 seconds and 3 git commands to generate.