Skip to content

Commit c1a941e

Browse files
vanshikaaroradomdomegg
authored andcommitted
Modified scroll behaviour of review activity (commons-app#2732)
1 parent fc3d242 commit c1a941e

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

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

+31-27
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,33 @@
1515

1616
<include layout="@layout/toolbar" />
1717

18+
<Button
19+
android:id="@+id/skip_image"
20+
android:layout_width="match_parent"
21+
android:layout_height="25dp"
22+
android:background="@android:color/transparent"
23+
android:layout_below="@+id/toolbar"
24+
android:text="@string/skip_image"
25+
android:textColor="@color/button_blue_dark"
26+
android:textStyle="bold" />
27+
<ScrollView
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:layout_below="@+id/skip_image"
31+
android:layout_above="@+id/reviewPagerIndicator"
32+
>
33+
1834
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
1935
android:layout_width="match_parent"
2036
android:layout_height="match_parent"
21-
android:layout_below="@id/toolbar"
2237
android:orientation="vertical"
23-
android:weightSum="15">
24-
25-
<Button
26-
android:id="@+id/skip_image"
27-
android:layout_width="match_parent"
28-
android:layout_height="0dp"
29-
android:layout_weight="1"
30-
android:background="@android:color/transparent"
31-
android:text="SKIP THIS IMAGE"
32-
android:textColor="@color/button_blue_dark"
33-
android:textStyle="bold" />
38+
>
3439

3540
<RelativeLayout
3641
android:layout_width="match_parent"
3742
android:layout_height="300dp"
38-
android:layout_marginTop="5dp">
43+
android:layout_marginTop="5dp"
44+
>
3945

4046
<com.facebook.drawee.view.SimpleDraweeView
4147
android:id="@+id/imageView"
@@ -73,26 +79,24 @@
7379

7480
</RelativeLayout>
7581

76-
7782
<fr.free.nrw.commons.review.ReviewViewPager
7883
android:id="@+id/reviewPager"
7984
android:layout_width="match_parent"
80-
android:layout_height="0dp"
81-
android:layout_weight="13.5"
85+
android:layout_height="300dp"
8286
android:fadingEdge="none" />
8387

84-
85-
<com.viewpagerindicator.CirclePageIndicator
86-
android:id="@+id/reviewPagerIndicator"
87-
android:layout_width="match_parent"
88-
android:layout_height="0dp"
89-
android:layout_gravity="center"
90-
android:layout_weight="0.5"
91-
android:background="?attr/colorPrimaryDark"
92-
android:elevation="1dp"
93-
android:foregroundGravity="center_vertical" />
94-
9588
</LinearLayout>
89+
</ScrollView>
90+
<com.viewpagerindicator.CirclePageIndicator
91+
android:id="@+id/reviewPagerIndicator"
92+
android:layout_width="match_parent"
93+
android:layout_height="10dp"
94+
android:layout_gravity="center"
95+
android:background="?attr/colorPrimaryDark"
96+
android:elevation="1dp"
97+
android:foregroundGravity="center_vertical"
98+
android:layout_alignParentBottom="true"/>
99+
96100

97101
</RelativeLayout>
98102

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

+3-10
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44
android:layout_height="match_parent"
55
android:orientation="vertical">
66

7-
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
8-
android:id="@+id/scroll"
9-
android:layout_width="wrap_content"
10-
android:layout_height="match_parent"
11-
android:layout_above="@+id/bottomview"
12-
android:layout_alignParentTop="true">
7+
138

149
<LinearLayout
1510
android:layout_width="match_parent"
@@ -31,7 +26,7 @@
3126
<TextView
3227
android:id="@+id/reviewQuestionContext"
3328
android:layout_width="match_parent"
34-
android:layout_height="100dp"
29+
android:layout_height="wrap_content"
3530
android:layout_marginBottom="15dp"
3631
android:gravity="center_vertical"
3732
android:text="testing2"
@@ -72,13 +67,11 @@
7267

7368
</LinearLayout>
7469

75-
</ScrollView>
76-
7770

7871
<View
7972
android:id="@+id/bottomview"
8073
android:layout_width="match_parent"
81-
android:layout_height="10dp"
74+
android:layout_height="15dp"
8275
android:layout_alignParentBottom="true"
8376
android:background="?attr/colorPrimaryDark"></View>
8477

app/src/main/res/values/strings.xml

+1
Original file line numberDiff line numberDiff line change
@@ -531,4 +531,5 @@ Upload your first media by tapping on the add button.</string>
531531
<string name="images_featured_explanation">Featured pictures are images from highly skilled photographers and illustrators that the Wikimedia Commons community has chosen as some of the highest quality on the site.</string>
532532
<string name="images_via_nearby_explanation">Images Uploaded via Nearby places are the images which are uploaded by discovering places on the map.</string>
533533
<string name="thanks_received_explanation" >This feature allows editors to send a Thank you notification to users who make useful edits – by using a small thank link on the history page or diff page.</string>
534+
<string name="skip_image">SKIP THIS IMAGE</string>
534535
</resources>

0 commit comments

Comments
 (0)