public final class AddEventActivity extends Activity implements OnDateSetListener, OnTimeSetListener{
private TextView dateTimeTextView;
- private Event tempEvent=new Event();
+ private static Event tempEvent=new Event();
public static final String EXTRA_EVENT = "event";
+ private static Fragment f1,f2,f3;
public static void editEvent(final Context c, final Event e) {
Intent i = new Intent(c,AddEventActivity.class);
i.putExtra(AddEventActivity.EXTRA_EVENT,e);
+ tempEvent=e;
c.startActivity(i);
}
final ActionBar.Tab t2 = actionBar.newTab().setText(this.getString(R.string.addevtab2));
final ActionBar.Tab t3 = actionBar.newTab().setText(this.getString(R.string.addevtab3));
- final Fragment f1 = new TrivialFragment();
+ f1 = new TrivialFragment();
final Bundle b1=new Bundle();
b1.putInt(TrivialFragment.ARGUMENT_LAYOUT, R.layout.add_event_basic_tab);
f1.setArguments(b1);
- final Fragment f2 = new TrivialFragment();
+ f2 = new TrivialFragment();
final Bundle b2=new Bundle();
b2.putInt(TrivialFragment.ARGUMENT_LAYOUT, R.layout.add_event_details_tab);
f2.setArguments(b2);
- final Fragment f3 = new TrivialFragment();
+ f3 = new TrivialFragment();
final Bundle b3=new Bundle();
b3.putInt(TrivialFragment.ARGUMENT_LAYOUT, R.layout.add_event_other_tab);
f3.setArguments(b3);
import android.app.ActionBar.Tab;
import android.app.Fragment;
import android.app.FragmentTransaction;
+import android.widget.EditText;
+import android.widget.TextView;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@Override
public void onTabSelected(final Tab tab, final FragmentTransaction ft) {
ft.replace(R.id.fragment_container, fragment);
+ switch (tabId) {
+ case 0:
+ if(fragment.getView()==null) System.err.println("MuieLaComisie");
+ //EditText title =(EditText) fragment.getView().findViewById(R.id.eventtitle);
+ // title.setText(ev.title, TextView.BufferType.EDITABLE);
+ break;
+ }
}
@Override