diff --git a/OsmAnd/res/layout/fragment_reports.xml b/OsmAnd/res/layout/fragment_reports.xml
index 78dd76a44b..f11808cc21 100644
--- a/OsmAnd/res/layout/fragment_reports.xml
+++ b/OsmAnd/res/layout/fragment_reports.xml
@@ -11,62 +11,113 @@
+ android:paddingLeft="16dp">
+ android:layout_marginRight="16dp"
+ android:gravity="center_vertical"
+ android:text="@string/select_month_and_country"
+ android:textColor="?android:textColorPrimary"/>
+
+
+
+
+ android:layout_gravity="fill_horizontal|fill_vertical"
+ android:layout_marginLeft="8dp"
+ android:layout_marginRight="42dp"
+ android:gravity="center_vertical"/>
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ android:layout_height="60dp"
+ android:src="@drawable/ic_group"/>
+
+
+
+
+
+
+
diff --git a/OsmAnd/res/layout/reports_for_spinner_item.xml b/OsmAnd/res/layout/reports_for_spinner_item.xml
new file mode 100644
index 0000000000..a176aa8346
--- /dev/null
+++ b/OsmAnd/res/layout/reports_for_spinner_item.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index e2abab01ca..daed46aa1b 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -2155,4 +2155,7 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
Morning
Night
Select month and country
+ Number of contributors
+ Number of edits
+ Report for:
\ No newline at end of file
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
index 775ee8adb8..c1474ac400 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
@@ -51,8 +51,8 @@ public class ReportsFragment extends BaseOsmAndFragment {
regionReportsSpinner = (Spinner) view.findViewById(R.id.regionReportsSpinner);
ArrayAdapter regionsForReportsAdapter =
- new ArrayAdapter(getActivity(), android.R.layout.simple_spinner_item,
- new String[]{"Worldwide"});
+ new ArrayAdapter(getActivity(), R.layout.reports_for_spinner_item,
+ android.R.id.text1, new String[]{"Worldwide"});
regionsForReportsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
regionReportsSpinner.setAdapter(regionsForReportsAdapter);
@@ -90,8 +90,12 @@ public class ReportsFragment extends BaseOsmAndFragment {
new GetJsonAsyncTask.OnResponseListener() {
@Override
public void onResponse(Protocol.TotalChangesByMonthResponse response) {
- contributorsTextView.setText(String.valueOf(response.users));
- editsTextView.setText(String.valueOf(response.changes));
+ if (contributorsTextView != null) {
+ contributorsTextView.setText(String.valueOf(response.users));
+ }
+ if (editsTextView != null) {
+ editsTextView.setText(String.valueOf(response.changes));
+ }
}
};
requestData(monthUrlString, regionUrlString, onResponseListener);