Skip to content

Commit

Permalink
Added Clear button in Comprehension and Quiz Template
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin Aggarwal authored and opticod committed Jan 29, 2017
1 parent 7310b97 commit a3993ce
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 @@ -463,4 +463,5 @@
<string name="check_update">Update</string>
<string name="update_title">Check for New Version</string>
<string name="update_summary">Check for Latest Version of app Playstore</string>
<string name="comprehension_clear_all">CLEAR</string>
</resources>

0 comments on commit a3993ce

Please sign in to comment.