X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=src%2Fro%2Fieval%2Funical%2FDisplayEventActivity.java;h=dd2b3bacd16a38d3dd328015009ad5af9ebaa782;hb=93afae01c0ef25230caa144d35e49a9ae29fa62d;hp=31e0626f907b16ca709431ace770f82dca1bdc54;hpb=5f71502fa3d0e4a942dbb776a697a5f84d1c72dc;p=unical.git diff --git a/src/ro/ieval/unical/DisplayEventActivity.java b/src/ro/ieval/unical/DisplayEventActivity.java index 31e0626..dd2b3ba 100644 --- a/src/ro/ieval/unical/DisplayEventActivity.java +++ b/src/ro/ieval/unical/DisplayEventActivity.java @@ -15,10 +15,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.widget.ArrayAdapter; -import android.widget.Button; -import android.widget.ListView; -import android.widget.TextView; +import android.widget.*; public class DisplayEventActivity extends Activity { private final class DeleteListener implements View.OnClickListener { @@ -44,7 +41,7 @@ public class DisplayEventActivity extends Activity { final LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); final View rowView = inflater.inflate(R.layout.alarm_row_layout, parent, false); final TextView date = (TextView) rowView.findViewById(R.id.alarm_datetime); - final Button delete = (Button) rowView.findViewById(R.id.alarm_delete); + final ImageButton delete = (ImageButton) rowView.findViewById(R.id.alarm_delete); delete.setOnClickListener(new DeleteListener(getItem(position))); date.setText(DateFormat.getDateTimeInstance().format(getItem(position))); @@ -117,9 +114,7 @@ public class DisplayEventActivity extends Activity { AddEventActivity.editEvent(this, event); return true; case R.id.add_alarm: - final Intent intent = new Intent(this, AddAlarmActivity.class); - intent.putExtra(AddAlarmActivity.EXTRA_EVENT, event._id); - startActivity(intent); + AddAlarmActivity.addAlarm(this,event); return true; default: return false;