Show wikidata edits done through the app (#2431)

* Show wikidata edits done through the app

* Minor changes based on code review
This commit is contained in:
Vivek Maskara 2019-02-12 22:28:22 +05:30 committed by Josephine Lim
parent aee8839eea
commit 73bb0c52c9
8 changed files with 138 additions and 18 deletions

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="@color/primaryColor"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
</vector>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -254,6 +255,7 @@
<ImageView
android:layout_width="@dimen/overflow_icon_dimen"
android:layout_height="@dimen/overflow_icon_dimen"
android:layout_centerVertical="true"
android:id="@+id/featured_image_icon"
app:srcCompat="@drawable/featured" />
@ -264,6 +266,7 @@
android:layout_toRightOf="@+id/featured_image_icon"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:text="@string/statistics_featured" />
@ -272,13 +275,14 @@
android:layout_height="wrap_content"
style="?android:textAppearanceMedium"
android:layout_alignParentRight="true"
android:layout_marginEnd="44dp"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:text="2"
android:layout_centerVertical="true"
tools:text="2"
android:id="@+id/image_featured"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_marginRight="44dp" />
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp" />
</RelativeLayout>
@ -286,14 +290,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_marginEnd="@dimen/activity_margin_horizontal"
android:layout_marginRight="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal">
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginEnd="@dimen/activity_margin_horizontal">
<ImageView
android:layout_width="@dimen/overflow_icon_dimen"
android:layout_height="@dimen/overflow_icon_dimen"
app:srcCompat="@drawable/ic_thanks"
android:layout_centerVertical="true"
android:id="@+id/thanks_image_icon"
android:scaleType="centerCrop" />
@ -304,6 +310,7 @@
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_toRightOf="@+id/thanks_image_icon"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_centerVertical="true"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:text="@string/statistics_thanks" />
@ -312,13 +319,57 @@
android:layout_height="wrap_content"
style="?android:textAppearanceMedium"
android:layout_alignParentRight="true"
android:layout_marginEnd="44dp"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:text="2"
android:layout_centerVertical="true"
tools:text="2"
android:id="@+id/thanks_received"
android:layout_marginRight="44dp" />
android:layout_marginEnd="24dp"
android:layout_marginRight="24dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_marginRight="@dimen/activity_margin_horizontal"
android:layout_marginEnd="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_marginTop="@dimen/activity_margin_horizontal">
<ImageView
android:layout_width="@dimen/overflow_icon_dimen"
android:layout_height="@dimen/overflow_icon_dimen"
android:id="@+id/wikidata_edits_icon"
android:layout_centerVertical="true"
app:srcCompat="@drawable/edit_ascent_color" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:textAppearanceMedium"
android:layout_toRightOf="@+id/wikidata_edits_icon"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_centerVertical="true"
android:text="@string/statistics_wikidata_edits" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="?android:textAppearanceMedium"
android:layout_alignParentRight="true"
android:layout_marginLeft="@dimen/activity_margin_horizontal"
android:layout_marginEnd="24dp"
android:layout_marginTop="@dimen/activity_margin_horizontal"
android:layout_marginStart="@dimen/activity_margin_horizontal"
android:layout_centerVertical="true"
tools:text="2"
android:id="@+id/wikidata_edits"
android:layout_marginRight="24dp" />
</RelativeLayout>
</LinearLayout>

View file

@ -2,8 +2,8 @@
<dimen name="bottom_peak_height">240dp</dimen>
<!-- Standard margin / padding for the containing activity -->
<dimen name="activity_margin_horizontal">16dp</dimen>
<dimen name="activity_margin_vertical">16dp</dimen>
<dimen name="activity_margin_horizontal">8dp</dimen>
<dimen name="activity_margin_vertical">8dp</dimen>
<dimen name="achievements_activity_margin_vertical">8dp</dimen>
<!-- Standard margins / padding -->

View file

@ -357,6 +357,7 @@
<string name="statistics">STATISTICS</string>
<string name="statistics_thanks">Thanks Received</string>
<string name="statistics_featured">Featured Images</string>
<string name="statistics_wikidata_edits">Images via \"Nearby Places\"</string>
<string name="level">LEVEL</string>
<string name="images_uploaded">Images Uploaded</string>
<string name="image_reverts">Images Not Reverted</string>