Skip to content

Commit

Permalink
Fixed Issue: #9, #20
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas29 committed Feb 17, 2016
1 parent a7efde9 commit 1494900
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 6 additions & 1 deletion source-code/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@
<string name="info_template_edit">Edit</string>
<string name="info_template_add">Add</string>
<string name="info_template_delete">Delete</string>
<string name="info_template_ok">OK</string>
<string name="info_template_cancel">Cancel</string>
<string name="info_add_new_title">Add new item</string>
<string name="info_edit_title">Edit item</string>
<string name="info_delete_item_content">Are you sure you want to delete this item?</string>
<string name="info_template">InfoTemplate</string>

Expand Down Expand Up @@ -109,8 +112,10 @@
<string name="quiz_new_question_title">Add New Question</string>
<string name="quiz_type">QuizTemplate</string>

<string name="quiz_delete">Delete</string>
<string name="quiz_add">Add</string>
<string name="quiz_delete">Delete</string>
<string name="quiz_ok">OK</string>
<string name="quiz_cancel">Cancel</string>
<string name="quiz_edit">Edit Question</string>
<string name="quiz_description">Choose this template to create Quiz-like applications</string>
<string name="hint_quiz_name">Template Name</string>
Expand Down

0 comments on commit 1494900

Please sign in to comment.