Skip to content

Commit e93564f

Browse files
cypheropmaskaravivek
authored andcommitted
Improved Result of the quiz activity for smaller screens(commons-app#2010) (commons-app#2304)
* Improved Result of the quiz activity for smaller screens(commons-app#2010) * added scroll view
1 parent b2038ac commit e93564f

File tree

1 file changed

+62
-55
lines changed

1 file changed

+62
-55
lines changed

app/src/main/res/layout/activity_quiz_result.xml

Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,69 +20,76 @@
2020
android:layout_marginRight="@dimen/activity_margin_horizontal"
2121
android:layout_marginTop="@dimen/activity_margin_vertical">
2222

23-
<RelativeLayout
23+
<ScrollView
2424
android:layout_width="match_parent"
25-
android:layout_height="match_parent">
26-
27-
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
28-
xmlns:tools="http://schemas.android.com/tools"
25+
android:layout_height="wrap_content"
26+
>
27+
<RelativeLayout
2928
android:layout_width="match_parent"
30-
android:layout_height="wrap_content"
31-
xmlns:app="http://schemas.android.com/apk/res-auto"
32-
android:orientation="vertical"
33-
tools:context="fr.free.nrw.commons.quiz.QuizResultActivity">
34-
29+
android:layout_height="match_parent">
3530

36-
<TextView
37-
android:layout_width="wrap_content"
31+
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
32+
xmlns:tools="http://schemas.android.com/tools"
33+
android:layout_width="match_parent"
3834
android:layout_height="wrap_content"
39-
android:layout_gravity="center_horizontal"
40-
android:text="@string/result"
41-
style="?android:textAppearanceLarge"
42-
android:textSize="32dp"
43-
android:layout_marginTop="@dimen/activity_margin_vertical" />
35+
xmlns:app="http://schemas.android.com/apk/res-auto"
36+
android:orientation="vertical"
37+
tools:context="fr.free.nrw.commons.quiz.QuizResultActivity"
38+
android:id="@+id/quiz_result">
4439

45-
<com.dinuscxj.progressbar.CircleProgressBar
46-
android:layout_width="match_parent"
47-
android:layout_height="250dp"
48-
android:layout_marginRight="@dimen/activity_margin_horizontal"
49-
android:layout_marginLeft="@dimen/activity_margin_horizontal"
50-
android:layout_marginTop="@dimen/activity_margin_vertical"
51-
android:progress="50"
52-
app:progress_end_color="#8C8B98"
53-
app:progress_start_color="#3A3381"
54-
app:progress_stroke_width="15dp"
55-
app:progress_text_size="32dp"
56-
app:progress_text_format_pattern="4/5"
57-
app:style="solid_line"
58-
android:id="@+id/result_progress_bar"/>
5940

60-
<TextView
61-
android:layout_width="match_parent"
62-
android:layout_height="wrap_content"
63-
android:layout_marginRight="@dimen/activity_margin_horizontal"
64-
android:layout_marginLeft="@dimen/activity_margin_horizontal"
65-
android:layout_marginTop="@dimen/activity_margin_vertical"
66-
android:layout_marginBottom="@dimen/activity_margin_vertical"
67-
style="?android:textAppearanceMedium"
68-
android:gravity="center_horizontal"
69-
android:id="@+id/congratulatory_message"
70-
android:text="@string/congratulatory_message_quiz" />
41+
<TextView
42+
android:layout_width="wrap_content"
43+
android:layout_height="wrap_content"
44+
android:layout_gravity="center_horizontal"
45+
android:text="@string/result"
46+
style="?android:textAppearanceLarge"
47+
android:textSize="32dp"
48+
android:layout_marginTop="@dimen/activity_margin_vertical" />
49+
50+
<com.dinuscxj.progressbar.CircleProgressBar
51+
android:layout_width="match_parent"
52+
android:layout_height="250dp"
53+
android:layout_marginRight="@dimen/activity_margin_horizontal"
54+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
55+
android:layout_marginTop="@dimen/activity_margin_vertical"
56+
android:progress="50"
57+
app:progress_end_color="#8C8B98"
58+
app:progress_start_color="#3A3381"
59+
app:progress_stroke_width="15dp"
60+
app:progress_text_size="32dp"
61+
app:progress_text_format_pattern="4/5"
62+
app:style="solid_line"
63+
android:id="@+id/result_progress_bar"/>
64+
65+
<TextView
66+
android:layout_width="match_parent"
67+
android:layout_height="wrap_content"
68+
android:layout_marginRight="@dimen/activity_margin_horizontal"
69+
android:layout_marginLeft="@dimen/activity_margin_horizontal"
70+
android:layout_marginTop="@dimen/activity_margin_vertical"
71+
android:layout_marginBottom="@dimen/activity_margin_vertical"
72+
style="?android:textAppearanceMedium"
73+
android:gravity="center_horizontal"
74+
android:id="@+id/congratulatory_message"
75+
android:text="@string/congratulatory_message_quiz" />
7176

72-
</LinearLayout>
77+
</LinearLayout>
7378

74-
<Button
75-
android:layout_width="150dp"
76-
android:layout_alignParentBottom="true"
77-
android:layout_alignParentRight="true"
78-
android:layout_marginRight="@dimen/activity_margin_horizontal"
79-
android:id="@+id/quiz_result_next"
80-
android:layout_marginBottom="@dimen/activity_margin_vertical"
81-
android:paddingHorizontal="@dimen/activity_margin_horizontal"
82-
android:layout_height="wrap_content"
83-
android:backgroundTint="#D6DCE0"
84-
android:text="Continue" />
79+
<Button
80+
android:layout_width="150dp"
81+
android:layout_alignParentBottom="true"
82+
android:layout_alignParentRight="true"
83+
android:layout_marginRight="@dimen/activity_margin_horizontal"
84+
android:layout_below="@+id/quiz_result"
85+
android:id="@+id/quiz_result_next"
86+
android:layout_marginBottom="@dimen/activity_margin_vertical"
87+
android:paddingHorizontal="@dimen/activity_margin_horizontal"
88+
android:layout_height="wrap_content"
89+
android:backgroundTint="#D6DCE0"
90+
android:text="Continue" />
8591

86-
</RelativeLayout>
92+
</RelativeLayout>
93+
</ScrollView>
8794
</android.support.v7.widget.CardView>
8895
</LinearLayout>

0 commit comments

Comments
 (0)