Skip to content

Commit

Permalink
Merge pull request #366 from codingblazer/clearoptions
Browse files Browse the repository at this point in the history
Added clear button in Comprehension and Quiz Template
  • Loading branch information
opticod authored Jan 24, 2017
2 parents 9da7200 + f818888 commit 6eea6bd
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ public void onClick(View v) {
}
});

rootView.findViewById(R.id.clear).setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
rg.clearCheck();
}
});

if (Integer.parseInt(questionId) == 1) {

rootView.findViewById(R.id.previous).setVisibility(View.INVISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,14 @@ public void onClick(View v) {
}
});

rootView.findViewById(R.id.clear).setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
rg.clearCheck();
}
});

if (Integer.parseInt(questionId) == 1) {

rootView.findViewById(R.id.previous).setVisibility(View.INVISIBLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,21 @@
android:text="@string/comprehension_previous"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="@color/black_secondary_text" />
<Button
android:id="@+id/clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_toLeftOf="@+id/previous"
android:layout_toStartOf="@+id/previous"
android:background="@android:color/transparent"
android:paddingBottom="@dimen/headline_leading_simulator"
android:paddingLeft="@dimen/activity_vertical_margin_simulator"
android:paddingRight="@dimen/activity_vertical_margin_simulator"
android:paddingTop="@dimen/activity_vertical_margin_simulator"
android:text="@string/comprehension_clear_all"
android:textAppearance="?android:textAppearanceSmall"
android:textColor="@color/black_secondary_text" />

</RelativeLayout>

Expand Down
1 change: 1 addition & 0 deletions source-code/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,5 @@
<string name="pref_tell_key">tell</string>
<string name="pref_tell_title">Tell a friend</string>
<string name="pref_tell_message">BuildmLearn Toolkit for your phone. Download it from here :</string>
<string name="comprehension_clear_all">CLEAR</string>
</resources>

0 comments on commit 6eea6bd

Please sign in to comment.