From 1494900917f3653f65e8c9a7feb8641e677f5a17 Mon Sep 17 00:00:00 2001 From: Shreyas Patel Date: Wed, 17 Feb 2016 12:25:38 +0530 Subject: [PATCH] Fixed Issue: #9, #20 --- .../org/buildmlearn/toolkit/templates/FlashTemplate.java | 8 ++++---- .../org/buildmlearn/toolkit/templates/InfoTemplate.java | 8 ++++---- .../toolkit/templates/LearnSpellingTemplate.java | 8 ++++---- .../org/buildmlearn/toolkit/templates/QuizTemplate.java | 6 +++--- source-code/app/src/main/res/values/strings.xml | 7 ++++++- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/FlashTemplate.java b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/FlashTemplate.java index fe0e5dfe..570850c4 100644 --- a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/FlashTemplate.java +++ b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/FlashTemplate.java @@ -98,7 +98,7 @@ public void addItem(final Activity activity) { .title(R.string.info_add_new_title) .customView(R.layout.flash_dialog_add_edit_item, true) .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .negativeText(R.string.info_template_cancel) .build(); final EditText question = (EditText) dialog.findViewById(R.id.flash_question); @@ -158,10 +158,10 @@ public void editItem(final Activity activity, int position) { FlashCardModel data = mData.get(position); final MaterialDialog dialog = new MaterialDialog.Builder(activity) - .title(R.string.info_add_new_title) + .title(R.string.info_edit_title) .customView(R.layout.flash_dialog_add_edit_item, true) - .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .positiveText(R.string.info_template_ok) + .negativeText(R.string.info_template_cancel) .build(); final EditText question = (EditText) dialog.findViewById(R.id.flash_question); diff --git a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/InfoTemplate.java b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/InfoTemplate.java index e3b042f9..09252ed0 100644 --- a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/InfoTemplate.java +++ b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/InfoTemplate.java @@ -93,7 +93,7 @@ public void addItem(final Activity activity) { .title(R.string.info_add_new_title) .customView(R.layout.info_dialog_add_edit_data, true) .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .negativeText(R.string.info_template_cancel) .build(); final EditText word = (EditText) dialog.findViewById(R.id.info_word); @@ -123,10 +123,10 @@ public void onClick(View v) { @Override public void editItem(final Activity activity, int position) { final MaterialDialog dialog = new MaterialDialog.Builder(activity) - .title(R.string.info_add_new_title) + .title(R.string.info_edit_title) .customView(R.layout.info_dialog_add_edit_data, true) - .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .positiveText(R.string.info_template_ok) + .negativeText(R.string.info_template_cancel) .build(); final InfoModel data = infoData.get(position); diff --git a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/LearnSpellingTemplate.java b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/LearnSpellingTemplate.java index baef8e00..c5548e9d 100644 --- a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/LearnSpellingTemplate.java +++ b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/LearnSpellingTemplate.java @@ -93,7 +93,7 @@ public void addItem(final Activity activity) { .title(R.string.info_add_new_title) .customView(R.layout.info_dialog_add_edit_data, true) .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .negativeText(R.string.info_template_cancel) .build(); final EditText word = (EditText) dialog.findViewById(R.id.info_word); @@ -123,10 +123,10 @@ public void onClick(View v) { @Override public void editItem(final Activity activity, int position) { final MaterialDialog dialog = new MaterialDialog.Builder(activity) - .title(R.string.info_add_new_title) + .title(R.string.info_edit_title) .customView(R.layout.info_dialog_add_edit_data, true) - .positiveText(R.string.info_template_add) - .negativeText(R.string.info_template_delete) + .positiveText(R.string.info_template_ok) + .negativeText(R.string.info_template_cancel) .build(); final LearnSpellingModel data = mLearnSpellingData.get(position); diff --git a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/QuizTemplate.java b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/QuizTemplate.java index 5780ca70..17f0a30d 100644 --- a/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/QuizTemplate.java +++ b/source-code/app/src/main/java/org/buildmlearn/toolkit/templates/QuizTemplate.java @@ -82,7 +82,7 @@ public void addItem(final Activity activity) { .title(R.string.quiz_new_question_title) .customView(R.layout.quiz_dialog_add_question, true) .positiveText(R.string.quiz_add) - .negativeText(R.string.quiz_delete) + .negativeText(R.string.quiz_cancel) .build(); final EditText question = (EditText) dialog.findViewById(R.id.quiz_question); @@ -163,8 +163,8 @@ public void editItem(final Activity activity, final int position) { final MaterialDialog dialog = new MaterialDialog.Builder(activity) .title(R.string.quiz_edit) .customView(R.layout.quiz_dialog_add_question, true) - .positiveText(R.string.quiz_add) - .negativeText(R.string.quiz_delete) + .positiveText(R.string.quiz_ok) + .negativeText(R.string.quiz_cancel) .build(); final EditText question = (EditText) dialog.findViewById(R.id.quiz_question); diff --git a/source-code/app/src/main/res/values/strings.xml b/source-code/app/src/main/res/values/strings.xml index d6e2ddee..c360c933 100644 --- a/source-code/app/src/main/res/values/strings.xml +++ b/source-code/app/src/main/res/values/strings.xml @@ -50,7 +50,10 @@ Edit Add Delete + OK + Cancel Add new item + Edit item Are you sure you want to delete this item? InfoTemplate @@ -109,8 +112,10 @@ Add New Question QuizTemplate - Delete Add + Delete + OK + Cancel Edit Question Choose this template to create Quiz-like applications Template Name