From 296bca7d969b5b8a01442a3a68a4421ffe39937d Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 22 Dec 2017 13:09:55 +0200 Subject: [PATCH] Added the recipients for the World and corrected the text2 position --- OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java | 6 +++--- .../net/osmand/plus/liveupdates/UsersReportFragment.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java index ffb7762a7b..66f88b8cec 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/ReportsFragment.java @@ -134,9 +134,9 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect int monthItemPosition = monthReportsSpinner.getSelectedItemPosition(); String monthUrlString = monthsForReportsAdapter.getQueryString(monthItemPosition); String countryUrlString = selectedCountryItem.getDownloadName(); - if (countryUrlString.length() > 0) { + boolean isRecipientsReport = v.getId() == R.id.numberOfRecipientsLayout; + if (countryUrlString.length() > 0 || isRecipientsReport) { Bundle bl = new Bundle(); - boolean isRecipientsReport = v.getId() == R.id.numberOfRecipientsLayout; bl.putString(UsersReportFragment.URL_REQUEST, String.format(isRecipientsReport ? RECIPIENTS_BY_MONTH : USERS_RANKING_BY_MONTH, monthUrlString, countryUrlString)); userReportFragment.setArguments(bl); @@ -281,7 +281,7 @@ public class ReportsFragment extends BaseOsmAndFragment implements CountrySelect clearTextViewResult(recipientsTextView); clearTextViewResult(donationsTextView); clearTextViewResult(donationsTotalTextView); - + String recfinalUrl = String.format(RECIPIENTS_BY_MONTH, monthUrlString, regionUrlString); recChangesByMontAsyncTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, recfinalUrl); } diff --git a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java index 9d03c3ccf8..bba2d2155c 100644 --- a/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java +++ b/OsmAnd/src/net/osmand/plus/liveupdates/UsersReportFragment.java @@ -122,6 +122,7 @@ public class UsersReportFragment extends BaseOsmAndDialogFragment { text2.setTextColor(textSecondaryColor); text1.setCompoundDrawablesWithIntrinsicBounds(drawableLeft, null, null, null); text1.setCompoundDrawablePadding(getResources().getDimensionPixelSize(R.dimen.list_content_padding)); + text2.setPadding(text1.getTotalPaddingLeft(), text1.getTotalPaddingTop(), text1.getTotalPaddingRight(), text1.getTotalPaddingBottom()); Object item = getItem(position); if (item instanceof UserRankingByMonth) { UserRankingByMonth rankingByMonth = (UserRankingByMonth) item;