Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new record from the list view should use the day from the list view, not today. #88

Open
GoogleCodeExporter opened this issue Jun 29, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Go to the list view
2. Click the setting button to add a new record

What is the expected output?
* The record day should be the day where brings from the list view

What do you see instead?
* The record day is today


What version of the product are you using?
* 0.9.7

On what operating system?
Android 4.0

Original issue reported on code.google.com by [email protected] on 25 Feb 2012 at 1:31

@GoogleCodeExporter
Copy link
Author

DetailListHelper.java
-    public void doNewDetail() {
-        Detail d = new Detail("","",new Date(),0D,"");
-        Intent intent = null;
-        intent = new Intent(activity,DetailEditorActivity.class);
-        intent.putExtra(DetailEditorActivity.INTENT_MODE_CREATE,true);
-        intent.putExtra(DetailEditorActivity.INTENT_DETAIL,d);
-        
activity.startActivityForResult(intent,Constants.REQUEST_DETAIL_EDITOR_CODE);
-    }
+    public void doNewDetail() {
+        doNewDetail(null);
+    }
+
+    public void doNewDetail(Date date) {
+        Detail d = new Detail("", "", date == null ? new Date() : date, 0D, 
"");
+        Intent intent = null;
+        intent = new Intent(activity, DetailEditorActivity.class);
+        intent.putExtra(DetailEditorActivity.INTENT_MODE_CREATE, true);
+        intent.putExtra(DetailEditorActivity.INTENT_DETAIL, d);
+        activity.startActivityForResult(intent, 
Constants.REQUEST_DETAIL_EDITOR_CODE);
+    }

DetailListActivity.java
- detailListHelper.doNewDetail();
+ detailListHelper.doNewDetail(currentDate);

Original comment by [email protected] on 12 Apr 2012 at 4:07

@GoogleCodeExporter
Copy link
Author

I see it fixed in the current build, 0.9.8-121107-freshly.

Original comment by [email protected] on 28 Jan 2015 at 8:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant