android:layout_weight="1"
android:textAppearance="?android:attr/textAppearanceSmall" />
- <Button android:id="@+id/alarm_delete"
+ <ImageButton android:id="@+id/alarm_delete"
+ android:src="@android:drawable/ic_menu_close_clear_cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/delete"/>
+ android:background="@android:color/transparent"
+ />
</LinearLayout>
final TimePicker timePicker = (TimePicker) findViewById(R.id.timePicker);
final GregorianCalendar calendar = new GregorianCalendar(datePicker.getYear(), datePicker.getMonth(), datePicker.getDayOfMonth(), timePicker.getCurrentHour(), timePicker.getCurrentMinute(), 0);
try {
- Utils.addAlarm((Application) getApplication(), calendar.getTimeInMillis(), getIntent().getLongExtra(EXTRA_EVENT, 0));
+ Utils.addAlarm((Application) getApplication(), calendar.getTimeInMillis(), event._id);
finish();
}catch(SQLException e) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
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 {
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)));