]> iEval git - unical.git/commitdiff
Bugfix + changes the delete icon with cancel icon
authorPetru <l3asketballplayer@yahoo.com>
Thu, 22 Aug 2013 11:29:24 +0000 (14:29 +0300)
committerPetru <l3asketballplayer@yahoo.com>
Thu, 22 Aug 2013 11:29:24 +0000 (14:29 +0300)
res/layout/alarm_row_layout.xml
src/ro/ieval/unical/AddAlarmActivity.java
src/ro/ieval/unical/DisplayEventActivity.java

index 62aa6761d9c9c325c3a48f7630193581800c0508..87f885746b5e04c10299bc7dc11ed6af7cf0dd90 100644 (file)
                        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>
index 527250e6723dde2d5fb3d1d4332a2d8096da5d88..b79256cd144764bf6365f05bcf89b457a72d3cbe 100644 (file)
@@ -63,7 +63,7 @@ public class AddAlarmActivity  extends ListActivity {
                        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);
index 2ed4aab5d4bf6413be1abde3da9ac01ce090ad55..dd2b3bacd16a38d3dd328015009ad5af9ebaa782 100644 (file)
@@ -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)));
 
This page took 0.025774 seconds and 4 git commands to generate.