Skip to content

Commit

Permalink
changed extra type of 'dueDate' to java.util.date
Browse files Browse the repository at this point in the history
  • Loading branch information
mickey946 committed Mar 16, 2014
1 parent ccabf51 commit 3ca8786
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 2 deletions.
Binary file modified TodoListManager/bin/TodoListManager.apk
Binary file not shown.
Binary file modified TodoListManager/bin/classes.dex
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package il.ac.huji.todolist;

import java.util.Date;

import android.os.Bundle;
import android.annotation.SuppressLint;
import android.app.Activity;
Expand Down Expand Up @@ -33,7 +35,7 @@ public void add(View view) {
String task = edtTask.getText().toString();

DatePicker datePicker = (DatePicker) findViewById(R.id.datePicker);
long date = datePicker.getCalendarView().getDate();
Date date = new Date(datePicker.getCalendarView().getDate());

Intent returnIntent = new Intent();
returnIntent.putExtra("title", task);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import il.ac.huji.todolist.ActionTaskDialog.DeleteTaskDialogListener;

import java.util.ArrayList;
import java.util.Date;

import android.os.Build;
import android.os.Bundle;
Expand Down Expand Up @@ -104,7 +105,8 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// If the request went well (OK) and the request was TASK_N_DATE
if (resultCode == Activity.RESULT_OK && requestCode == TASK_N_DATE) {
String task = data.getStringExtra("title");
long date = data.getLongExtra("dueDate", 0);
Date ddate = (Date) data.getSerializableExtra("dueDate");
long date = ddate.getTime();

// add the item
if(task != null) {
Expand Down

0 comments on commit 3ca8786

Please sign in to comment.