mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Implemented Statistics
This commit is contained in:
parent
e028658051
commit
6744940970
7 changed files with 1504 additions and 311 deletions
|
|
@ -116,7 +116,8 @@ android {
|
|||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false // See https://stackoverflow.com/questions/40232404/google-play-apk-and-android-studio-apk-usb-debug-behaving-differently - proguard.cfg modification alone insufficient.
|
||||
minifyEnabled false
|
||||
// See https://stackoverflow.com/questions/40232404/google-play-apk-and-android-studio-apk-usb-debug-behaving-differently - proguard.cfg modification alone insufficient.
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
}
|
||||
debug {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="fr.free.nrw.commons">
|
||||
|
||||
|
|
@ -23,81 +24,81 @@
|
|||
android:name=".CommonsApplication"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/LightAppTheme"
|
||||
android:supportsRtl="true" >
|
||||
<activity android:name="org.acra.CrashReportDialog"
|
||||
android:theme="@android:style/Theme.Dialog"
|
||||
android:launchMode="singleInstance"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/LightAppTheme">
|
||||
<activity
|
||||
android:name="org.acra.CrashReportDialog"
|
||||
android:excludeFromRecents="true"
|
||||
android:finishOnTaskLaunch="true" />
|
||||
|
||||
android:finishOnTaskLaunch="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@android:style/Theme.Dialog" />
|
||||
<activity android:name=".auth.LoginActivity">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
|
||||
</activity>
|
||||
|
||||
<activity android:name=".WelcomeActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".upload.ShareActivity"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="audio/ogg" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".upload.MultipleShareActivity"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.SEND_MULTIPLE" />
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:mimeType="image/*" />
|
||||
<data android:mimeType="audio/ogg" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".contributions.ContributionsActivity"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name" />
|
||||
|
||||
<activity
|
||||
android:name=".settings.SettingsActivity"
|
||||
android:label="@string/title_activity_settings" />
|
||||
|
||||
<activity
|
||||
android:name=".AboutActivity"
|
||||
android:label="@string/title_activity_about"
|
||||
android:parentActivityName=".contributions.ContributionsActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".auth.SignupActivity"
|
||||
android:label="@string/title_activity_signup" />
|
||||
|
||||
<activity
|
||||
android:name=".nearby.NearbyActivity"
|
||||
android:label="@string/title_activity_nearby"
|
||||
android:parentActivityName=".contributions.ContributionsActivity" />
|
||||
|
||||
<activity
|
||||
android:name=".notification.NotificationActivity"
|
||||
android:label="@string/navigation_item_notification" />
|
||||
|
||||
<activity
|
||||
android:name=".category.CategoryImagesActivity"
|
||||
android:label="@string/title_activity_featured_images"
|
||||
android:parentActivityName=".contributions.ContributionsActivity" />
|
||||
|
||||
<service android:name=".upload.UploadService" />
|
||||
<activity
|
||||
android:name=".Achievements"
|
||||
android:label="@string/Achievements">
|
||||
<intent-filter>
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name=".upload.UploadService" />
|
||||
<service
|
||||
android:name=".auth.WikiAccountAuthenticatorService"
|
||||
android:exported="true"
|
||||
|
|
@ -110,24 +111,24 @@
|
|||
android:name="android.accounts.AccountAuthenticator"
|
||||
android:resource="@xml/authenticator" />
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name=".contributions.ContributionsSyncService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/contributions_sync_adapter" />
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name=".modifications.ModificationsSyncService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.content.SyncAdapter" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.content.SyncAdapter"
|
||||
android:resource="@xml/modifications_sync_adapter" />
|
||||
|
|
@ -142,21 +143,18 @@
|
|||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<provider
|
||||
android:name=".contributions.ContributionsContentProvider"
|
||||
android:authorities="fr.free.nrw.commons.contributions.contentprovider"
|
||||
android:exported="false"
|
||||
android:label="@string/provider_contributions"
|
||||
android:syncable="true" />
|
||||
|
||||
<provider
|
||||
android:name=".modifications.ModificationsContentProvider"
|
||||
android:authorities="fr.free.nrw.commons.modifications.contentprovider"
|
||||
android:exported="false"
|
||||
android:label="@string/provider_modifications"
|
||||
android:syncable="true" />
|
||||
|
||||
<provider
|
||||
android:name=".category.CategoryContentProvider"
|
||||
android:authorities="fr.free.nrw.commons.categories.contentprovider"
|
||||
|
|
|
|||
20
app/src/main/java/fr/free/nrw/commons/Achievements.java
Normal file
20
app/src/main/java/fr/free/nrw/commons/Achievements.java
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package fr.free.nrw.commons;
|
||||
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class Achievements extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_achievements);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1069
app/src/main/res/drawable/featured.xml
Normal file
1069
app/src/main/res/drawable/featured.xml
Normal file
File diff suppressed because it is too large
Load diff
4
app/src/main/res/drawable/ic_thanks.xml
Normal file
4
app/src/main/res/drawable/ic_thanks.xml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<vector android:height="24dp" android:viewportHeight="96"
|
||||
android:viewportWidth="96" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#00AF89" android:pathData="M17.36,17.959v46.007L5.56,77.188c24.029,0 72.417,0 77.54,0c7.133,0 7.471,-7.096 7.482,-7.449V17.959H17.36zM63.443,29.27c2.354,0 4.258,1.907 4.258,4.256s-1.904,4.253 -4.258,4.253c-2.348,0 -4.256,-1.904 -4.256,-4.253S61.096,29.27 63.443,29.27zM45.82,29.27c2.348,0 4.252,1.907 4.252,4.256s-1.904,4.253 -4.252,4.253c-2.351,0 -4.258,-1.904 -4.258,-4.253S43.47,29.27 45.82,29.27zM54.631,65.881c-12.434,0 -22.515,-10.082 -22.515,-22.518c0,0 11.276,4.866 22.996,4.866c11.986,0 22.035,-4.866 22.035,-4.866C77.146,55.799 67.066,65.881 54.631,65.881z"/>
|
||||
</vector>
|
||||
96
app/src/main/res/layout/activity_achievements.xml
Normal file
96
app/src/main/res/layout/activity_achievements.xml
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
<?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"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
<include
|
||||
android:id="@+id/toolbar"
|
||||
layout="@layout/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1.5"
|
||||
android:layout_below="@+id/toolbar"
|
||||
android:background="#D6DCE0">
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/statistics"
|
||||
style="?android:textAppearanceLarge"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginTop="@dimen/activity_margin_vertical"/>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@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/featured_image_icon"
|
||||
app:srcCompat="@drawable/featured"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:text="@string/statistics_featured"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginRight="@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"
|
||||
app:srcCompat="@drawable/ic_thanks"
|
||||
android:scaleType="centerCrop"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:textAppearanceMedium"
|
||||
android:layout_marginTop="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginStart="@dimen/activity_margin_horizontal"
|
||||
android:layout_marginLeft="@dimen/activity_margin_horizontal"
|
||||
android:text="@string/statistics_thanks"/>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<android.support.design.widget.NavigationView
|
||||
android:id="@+id/navigation_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="start"
|
||||
app:headerLayout="@layout/drawer_header"
|
||||
app:menu="@menu/drawer" />
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
|
|
@ -284,4 +284,9 @@
|
|||
<string name="share_coordinates_not_present">Coordinates were not specified during image selection</string>
|
||||
<string name="error_fetching_nearby_places">Error fetching nearby places.</string>
|
||||
|
||||
<string name="Achievements">Achievements</string>
|
||||
<string name="statistics">STATISTICS</string>
|
||||
<string name="statistics_thanks">Thanks Received</string>
|
||||
<string name="statistics_featured">Featured Images</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue