Skip to content

Commit c7e819d

Browse files
aniketnathmaskaravivek
authored andcommitted
fixed. I have fixed the layout desingn of achivement activity (commons-app#2469)
1 parent 83770ea commit c7e819d

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

app/src/main/java/fr/free/nrw/commons/upload/ImageProcessingService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ private Single<Integer> checkDarkImage(String filePath) {
117117

118118
/**
119119
* Checks for image geolocation
120+
* returns IMAGE_OK if the place is null or if the file doesn't contain a geolocation
120121
* @param filePath file to be checked
121122
* @return IMAGE_GEOLOCATION_DIFFERENT or IMAGE_OK
122123
*/
@@ -127,6 +128,11 @@ private Single<Integer> checkImageGeoLocation(Place place, String filePath) {
127128
}
128129
return Single.fromCallable(() -> filePath)
129130
.map(fileUtilsWrapper::getGeolocationOfFile)
130-
.flatMap(geoLocation -> imageUtilsWrapper.checkImageGeolocationIsDifferent(geoLocation, place.getLocation()));
131+
.flatMap(geoLocation -> {
132+
if (StringUtils.isNullOrWhiteSpace(geoLocation)) {
133+
return Single.just(ImageUtils.IMAGE_OK);
134+
}
135+
return imageUtilsWrapper.checkImageGeolocationIsDifferent(geoLocation, place.getLocation());
136+
});
131137
}
132138
}

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,11 @@
3131
android:layout_height="match_parent"
3232
android:orientation="vertical">
3333

34-
35-
3634
<RelativeLayout
3735
android:layout_width="match_parent"
3836
android:layout_height="wrap_content"
3937
android:layout_below="@+id/toolbar"
40-
android:background="@color/layout_light_grey"
38+
android:background="@color/opak_middle_grey"
4139
android:orientation="vertical">
4240

4341
<TextView
@@ -48,6 +46,7 @@
4846
android:layout_marginStart="@dimen/activity_margin_horizontal"
4947
android:layout_marginTop="@dimen/activity_margin_horizontal"
5048
android:text="@string/level"
49+
android:textColor="@color/white"
5150
android:id="@+id/achievement_level" />
5251

5352
<ImageView
@@ -57,7 +56,7 @@
5756
android:layout_marginTop="@dimen/activity_margin_vertical"
5857
android:layout_marginRight="@dimen/activity_margin_horizontal"
5958
android:layout_alignParentRight="true"
60-
app:srcCompat="@drawable/ic_info_outline_black_24dp"
59+
app:srcCompat="@drawable/ic_info_outline_white_24dp"
6160
android:layout_marginVertical="@dimen/activity_margin_vertical" />
6261

6362
<ImageView
@@ -86,6 +85,7 @@
8685
android:layout_marginStart="@dimen/activity_margin_horizontal"
8786
android:id="@+id/images_upload_text_param"
8887
android:layout_marginTop="@dimen/achievements_activity_margin_vertical"
88+
android:textColor="@color/layout_light_grey"
8989
android:text="@string/images_uploaded" />
9090

9191
<ImageView
@@ -133,6 +133,7 @@
133133
android:layout_marginLeft="@dimen/activity_margin_horizontal"
134134
android:id="@+id/images_reverted_text"
135135
android:layout_marginStart="@dimen/activity_margin_horizontal"
136+
android:textColor="@color/layout_light_grey"
136137
android:text="@string/image_reverts" />
137138

138139
<ImageView
@@ -150,6 +151,7 @@
150151
android:layout_height="wrap_content"
151152
android:text="@string/achievements_revert_limit_message"
152153
android:textSize="10dp"
154+
android:textColor="@color/layout_light_grey"
153155
android:id="@+id/images_revert_limit_text"
154156
android:layout_marginLeft="@dimen/activity_margin_horizontal"
155157
android:layout_marginStart="@dimen/activity_margin_horizontal"
@@ -188,6 +190,7 @@
188190
style="?android:textAppearanceMedium"
189191
android:layout_width="wrap_content"
190192
android:layout_height="wrap_content"
193+
android:textColor="@color/layout_light_grey"
191194
android:id="@+id/images_used_by_wiki_text"
192195
android:layout_marginLeft="@dimen/activity_margin_horizontal"
193196
android:layout_marginStart="@dimen/activity_margin_horizontal"

0 commit comments

Comments
 (0)