Skip to content

Commit d72bd44

Browse files
madhurgupta10neslihanturan
authored andcommitted
Added information dialog to Statistics commons-app#2599 (commons-app#2683)
1 parent 309a51f commit d72bd44

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

app/src/main/java/fr/free/nrw/commons/achievements/AchievementsActivity.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,24 @@ public void showUsedByWikiInfo(){
440440
,getResources().getString(R.string.images_used_explanation));
441441
}
442442

443+
@OnClick(R.id.images_nearby_info)
444+
public void showImagesViaNearbyInfo(){
445+
launchAlert(getResources().getString(R.string.statistics_wikidata_edits)
446+
,getResources().getString(R.string.images_via_nearby_explanation));
447+
}
448+
449+
@OnClick(R.id.images_featured_info)
450+
public void showFeaturedImagesInfo(){
451+
launchAlert(getResources().getString(R.string.statistics_featured)
452+
,getResources().getString(R.string.images_featured_explanation));
453+
}
454+
455+
@OnClick(R.id.thanks_received_info)
456+
public void showThanksReceivedInfo(){
457+
launchAlert(getResources().getString(R.string.statistics_thanks)
458+
,getResources().getString(R.string.thanks_received_explanation));
459+
}
460+
443461
/**
444462
* takes title and message as input to display alerts
445463
* @param title

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,17 @@
310310
android:layout_marginRight="@dimen/activity_margin_horizontal"
311311
android:text="@string/statistics_wikidata_edits" />
312312

313+
<ImageView
314+
android:layout_width="12dp"
315+
android:layout_height="12dp"
316+
android:id="@+id/images_nearby_info"
317+
android:layout_marginTop="8dp"
318+
android:layout_marginRight="@dimen/activity_margin_horizontal"
319+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
320+
android:layout_gravity="top"
321+
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
322+
android:tint="?attr/icon" />
323+
313324
</LinearLayout>
314325

315326

@@ -367,6 +378,17 @@
367378
android:layout_marginRight="@dimen/activity_margin_horizontal"
368379
android:text="@string/statistics_featured" />
369380

381+
<ImageView
382+
android:layout_width="12dp"
383+
android:layout_height="12dp"
384+
android:id="@+id/images_featured_info"
385+
android:layout_marginTop="8dp"
386+
android:layout_marginRight="@dimen/activity_margin_horizontal"
387+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
388+
android:layout_gravity="top"
389+
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
390+
android:tint="?attr/icon" />
391+
370392
</LinearLayout>
371393

372394
<TextView
@@ -423,6 +445,17 @@
423445
android:layout_marginRight="@dimen/activity_margin_horizontal"
424446
android:text="@string/statistics_thanks" />
425447

448+
<ImageView
449+
android:layout_width="12dp"
450+
android:layout_height="12dp"
451+
android:id="@+id/thanks_received_info"
452+
android:layout_marginTop="8dp"
453+
android:layout_marginRight="@dimen/activity_margin_horizontal"
454+
android:layout_marginEnd="@dimen/activity_margin_horizontal"
455+
android:layout_gravity="top"
456+
app:srcCompat="@drawable/ic_info_outline_blue_24dp"
457+
android:tint="?attr/icon" />
458+
426459
</LinearLayout>
427460

428461
<TextView

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,4 +476,7 @@ Upload your first media by tapping on the add button.</string>
476476
<string name="image_chooser_title">Choose Images to upload</string>
477477

478478
<string name="please_wait">Please wait…</string>
479+
<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>
480+
<string name="images_via_nearby_explanation">Images Uploaded via Nearby places are the images which are uploaded by discovering places on the map.</string>
481+
<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>
479482
</resources>

0 commit comments

Comments
 (0)