summaryrefslogtreecommitdiffstats
path: root/src/ryuslash/org/dvdroid/DVDDataSource.java
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-08-08 22:11:12 +0200
committerGravatar Tom Willemsen2012-08-08 22:11:12 +0200
commit9fc77db21845e2a89c03cea43228f95545c0b639 (patch)
tree54b2d4be154ddc51f84a09665d69bafcb1e99bd3 /src/ryuslash/org/dvdroid/DVDDataSource.java
parent0f2bd8ae16abe43e5f0985de8a710e8045f9b448 (diff)
downloaddvdroid-9fc77db21845e2a89c03cea43228f95545c0b639.tar.gz
dvdroid-9fc77db21845e2a89c03cea43228f95545c0b639.zip
Separate adding of DVDs
* AndroidManifest.xml: Add `AddDVDActivity' as an activity. * res/layout/add.xml: Layout for `AddDVDActivity'. * res/layout/main.xml: Remove the nested `LinearLayout' and `EditText' widgets. * res/values/strings.xml: Change the `name_entry' hint text, add captions for `wishlist_entry', `watched_entry' and `save_button'. * src/ryuslash/org/dvdroid/AddDVDActivity.java: New activity. * src/ryuslash/org/dvdroid/DVDDataSource.java (createDVD): Accept WATCHED and WISHLIST parameters and send these to the database instead of `0' and `1'. * src/ryuslash/org/dvdroid/DVDroidActivity.java (addDVD): Call `AddDVDActivity' to add a new DVD to the collection. (onActivityResult): New override.
Diffstat (limited to 'src/ryuslash/org/dvdroid/DVDDataSource.java')
-rw-r--r--src/ryuslash/org/dvdroid/DVDDataSource.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ryuslash/org/dvdroid/DVDDataSource.java b/src/ryuslash/org/dvdroid/DVDDataSource.java
index 428ecc4..6658c8d 100644
--- a/src/ryuslash/org/dvdroid/DVDDataSource.java
+++ b/src/ryuslash/org/dvdroid/DVDDataSource.java
@@ -33,13 +33,13 @@ public class DVDDataSource
dbHelper.close();
}
- public DVD createDVD(String title)
+ public DVD createDVD(String title, int watched, int wishlist)
{
ContentValues values = new ContentValues();
values.put(SQLiteHelper.COLUMN_TITLE, title);
- values.put(SQLiteHelper.COLUMN_WATCHED, 0);
- values.put(SQLiteHelper.COLUMN_WISHLIST, 1);
+ values.put(SQLiteHelper.COLUMN_WATCHED, watched);
+ values.put(SQLiteHelper.COLUMN_WISHLIST, wishlist);
long insertId = database.insert(SQLiteHelper.TABLE_DVD, null,
values);