]> iEval git - unical.git/commitdiff
Fix AddEventActivity
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 15 Aug 2013 17:43:38 +0000 (20:43 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 15 Aug 2013 17:43:38 +0000 (20:43 +0300)
src/ro/ieval/unical/AddEventActivity.java

index 8d00641084f34e8beb7753563b1e50e821bb04d8..373c4f9088053009a087e8e11c544785d212428d 100644 (file)
@@ -95,34 +95,32 @@ public final class AddEventActivity extends Activity implements OnDateSetListene
                final ActionBar actionBar = getActionBar();
                setContentView(R.layout.add_event);
 
-        if(getIntent().hasExtra(EXTRA_EVENT)) {
-            final LinearLayout layout = (LinearLayout) findViewById(R.id.repeat_layout);
-            final Switch repeatSwitch = (Switch) findViewById(R.id.repeat_switch);
-            Utils.setEnabledRecursively(layout, false);
-
-            repeatSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener(layout));
-
-            EditText title = (EditText) findViewById(R.id.eventtitle);
-            title.setText(event.title);
-
-            TextView tstart = (TextView) findViewById(R.id.time_start);
-            TextView tend = (TextView) findViewById(R.id.time_end);
-            SimpleDateFormat sf=new SimpleDateFormat("HH:mm");
-            Date d=new Date(event.dtstart);
-            tstart.setText(sf.format(d).toString());
-            d.setTime(event.dtend);
-            tend.setText(sf.format(d).toString());
-
-            SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
-            TextView dstart = (TextView)findViewById(R.id.date_start);
-            TextView dend = (TextView)findViewById(R.id.date_end);
-            d.setTime(event.dtstart);
-            dstart.setText(sd.format(d).toString());
-            d.setTime(event.dtend);
-            dend.setText(sd.format(d).toString());
-            EditText description = (EditText) findViewById(R.id.description);
-            description.setText(event.description);
-        }
+               final LinearLayout layout = (LinearLayout) findViewById(R.id.repeat_layout);
+               final Switch repeatSwitch = (Switch) findViewById(R.id.repeat_switch);
+               Utils.setEnabledRecursively(layout, false);
+
+               repeatSwitch.setOnCheckedChangeListener(new OnCheckedChangeListener(layout));
+
+               final EditText title = (EditText) findViewById(R.id.eventtitle);
+               title.setText(event.title);
+
+               final TextView tstart = (TextView) findViewById(R.id.time_start);
+               final TextView tend = (TextView) findViewById(R.id.time_end);
+               final SimpleDateFormat sf=new SimpleDateFormat("HH:mm");
+               final Date d=new Date(event.dtstart);
+               tstart.setText(sf.format(d).toString());
+               d.setTime(event.dtend);
+               tend.setText(sf.format(d).toString());
+
+               final SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
+               final TextView dstart = (TextView)findViewById(R.id.date_start);
+               final TextView dend = (TextView)findViewById(R.id.date_end);
+               d.setTime(event.dtstart);
+               dstart.setText(sd.format(d).toString());
+               d.setTime(event.dtend);
+               dend.setText(sd.format(d).toString());
+               final EditText description = (EditText) findViewById(R.id.description);
+               description.setText(event.description);
        }
 
        @Override
This page took 0.032453 seconds and 4 git commands to generate.