mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
[android]: Added display of MWM region file size on the global map download screen
This commit is contained in:
committed by
Konstantin Pastbin
parent
34f4a124d1
commit
042088dc46
@@ -111,10 +111,10 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
int status = MapManager.nativeGetStatus(mCurrentCountry);
|
int status = MapManager.nativeGetStatus(mCurrentCountry);
|
||||||
String name = MapManager.nativeGetName(mCurrentCountry);
|
|
||||||
|
|
||||||
if (status != CountryItem.STATUS_DONE)
|
if (status != CountryItem.STATUS_DONE)
|
||||||
{
|
{
|
||||||
|
String name = getFormattedCountryName(mCurrentCountry);
|
||||||
UiUtils.show(mChbDownloadCountry);
|
UiUtils.show(mChbDownloadCountry);
|
||||||
String checkBoxText;
|
String checkBoxText;
|
||||||
if (status == CountryItem.STATUS_UPDATABLE)
|
if (status == CountryItem.STATUS_UPDATABLE)
|
||||||
@@ -129,6 +129,18 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private String getFormattedCountryName(String mCurrentCountry) {
|
||||||
|
String name = MapManager.nativeGetName(mCurrentCountry);
|
||||||
|
CountryItem country = CountryItem.fill(mCurrentCountry);
|
||||||
|
String sizeText = StringUtils.getFileSizeString(DownloadResourcesLegacyActivity.this, country.totalSize);
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(sizeText)) {
|
||||||
|
name = name + " (" + sizeText + ")";
|
||||||
|
}
|
||||||
|
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
private final Listener mResourcesDownloadListener = new Listener()
|
private final Listener mResourcesDownloadListener = new Listener()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user