Skip to content

Commit 2175e2e

Browse files
committed
Fixed number of toasts if two or more options in Quiz Template are same.
1 parent 638d307 commit 2175e2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source-code/app/src/main/java/org/buildmlearn/toolkit/templates/QuizTemplate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public void onClick(View v) {
164164

165165
for(int i=0;i<options.size();i++){
166166
for(int j=0;j<i;j++){
167-
if (!options.get(i).getText().toString().trim().isEmpty() && options.get(i).getText().toString().trim().equalsIgnoreCase(options.get(j).getText().toString().trim())) {
167+
if (isValidated && !options.get(i).getText().toString().trim().isEmpty() && options.get(i).getText().toString().trim().equalsIgnoreCase(options.get(j).getText().toString().trim())) {
168168
Toast.makeText(activity.getApplication(), activity.getString(R.string.same_options), Toast.LENGTH_SHORT).show();
169169
isValidated=false;
170170
}

0 commit comments

Comments
 (0)