]> iEval git - unical.git/commitdiff
Edit event. work in progress[2]
authorPetru <l3asketballplayer@yahoo.com>
Tue, 13 Aug 2013 10:12:06 +0000 (13:12 +0300)
committerPetru <l3asketballplayer@yahoo.com>
Tue, 13 Aug 2013 10:12:06 +0000 (13:12 +0300)
src/ro/ieval/unical/AddEventActivity.java
src/ro/ieval/unical/AddEventTabListener.java

index 89fe73efc5276b25e699bc317a6aedfdac6d85a5..325909376b0a14c47bf5948be5fb9ef383962a9f 100644 (file)
@@ -18,12 +18,14 @@ import android.widget.*;
 
 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);
     }
 
@@ -39,17 +41,17 @@ public final class AddEventActivity extends Activity implements OnDateSetListene
                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);
index 364ce555738febbc01cac16e0228df7f1ba448be..aa9c763a1ec370dd30a942255572fbef2de705c0 100644 (file)
@@ -4,6 +4,8 @@ import android.app.ActionBar;
 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;
@@ -23,6 +25,13 @@ public class AddEventTabListener implements ActionBar.TabListener {
        @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
This page took 0.035311 seconds and 4 git commands to generate.