diff --git a/OsmAnd/res/layout/fragment_reports.xml b/OsmAnd/res/layout/fragment_reports.xml
index cc94f46c20..b900f162e6 100644
--- a/OsmAnd/res/layout/fragment_reports.xml
+++ b/OsmAnd/res/layout/fragment_reports.xml
@@ -275,6 +275,9 @@
android:background="?attr/dashboard_divider"/>
Donations
Number of recipients
Edits %1$s, rank %2$s, total edits %3$s
+ Edits %1$s, sum %2$s mBTC
OSM Editors ranking
OsmAnd Live subscription
Subscribe
@@ -2819,4 +2820,5 @@
File %1$s does not contain waypoints, import it as a track?
Move Point
Add to a GPX track
+ OSM Recipients
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/Protocol.java b/OsmAnd/src/net/osmand/plus/liveupdates/Protocol.java
index f7e41e3f62..5be7ad064d 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/Protocol.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/Protocol.java
@@ -23,6 +23,9 @@ public final class Protocol {
public int regionCount;
public float regionPercentage;
public float btc;
+ public float eur;
+ public float eurRate;
+ public Recipient[] rows;
}
public static class UserRankingByMonth {
@@ -48,5 +51,13 @@ public final class Protocol {
public int users;
public int changes;
}
-
+
+ public static class Recipient {
+ String osmid;
+ int changes;
+ String btcaddress;
+ int rank;
+ int weight;
+ float btc;
+ }
}
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
index 049fccb5c0..5207d72332 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java
@@ -52,6 +52,8 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
private static final Log LOG = PlatformUtil.getLog(ReportsFragment.class);
public static final String OSM_LIVE_URL = "https://osmand.net/osm_live";
+ public static final String EDITS_FRAGMENT = "NumberOfEditsFragment";
+ public static final String RECIPIENTS_FRAGMENT = "RecipientsFragment";
private TextView contributorsTextView;
private TextView editsTextView;
@@ -129,15 +131,23 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect
String countryUrlString = selectedCountryItem.getDownloadName();
if (countryUrlString.length() > 0) {
Bundle bl = new Bundle();
- bl.putString(UsersReportFragment.URL_REQUEST,
- String.format(USERS_RANKING_BY_MONTH, monthUrlString, countryUrlString));
- userReportFragment.setArguments(bl);
- userReportFragment.show(getChildFragmentManager(), "NumberOfEditsFramgnet");
+ if (v.getId() == R.id.numberOfRecipientsLayout) {
+ bl.putString(UsersReportFragment.URL_REQUEST,
+ String.format(RECIPIENTS_BY_MONTH, monthUrlString, countryUrlString));
+ userReportFragment.setArguments(bl);
+ userReportFragment.show(getChildFragmentManager(), RECIPIENTS_FRAGMENT);
+ } else {
+ bl.putString(UsersReportFragment.URL_REQUEST,
+ String.format(USERS_RANKING_BY_MONTH, monthUrlString, countryUrlString));
+ userReportFragment.setArguments(bl);
+ userReportFragment.show(getChildFragmentManager(), EDITS_FRAGMENT);
+ }
}
}
};
view.findViewById(R.id.numberOfContributorsLayout).setOnClickListener(listener);
view.findViewById(R.id.numberOfEditsLayout).setOnClickListener(listener);
+ view.findViewById(R.id.numberOfRecipientsLayout).setOnClickListener(listener);
countrySelectionFragment.initCountries(getMyApplication());
selectedCountryItem = countrySelectionFragment.getCountryItems().get(0);
diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java
index b9c19676f1..e78388b44a 100644
--- a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java
+++ b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java
@@ -1,7 +1,5 @@
package net.osmand.plus.liveupdates;
-import java.util.Arrays;
-
import net.osmand.plus.R;
import net.osmand.plus.base.BaseOsmAndDialogFragment;
import net.osmand.plus.liveupdates.Protocol.RankingUserByMonthResponse;
@@ -32,27 +30,45 @@ public class UsersReportFragment extends BaseOsmAndDialogFragment {
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_simple_list, container, false);
ListView listView = (ListView) view.findViewById(android.R.id.list);
- final ArrayAdapter adapter = new ListAdapter(getListItemIcon());
+ final ArrayAdapter