]> gitweb.fperrin.net Git - Dictionary.git/commitdiff
Display uncompressed size of dictionaries.
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 7 Dec 2015 22:30:32 +0000 (23:30 +0100)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Mon, 7 Dec 2015 22:30:32 +0000 (23:30 +0100)
src/com/hughes/android/dictionary/DictionaryManagerActivity.java

index f22f7d4cb800f06cded32416733bbc4a0c220707..bd9f364a1739bd039e2f9e3b65a1bb45c0820ab2 100644 (file)
@@ -529,8 +529,8 @@ public class DictionaryManagerActivity extends ActionBarActivity {
 
         final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
         final Button downloadButton = (Button) row.findViewById(R.id.downloadButton);
+        final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
         if (!canLaunch || updateAvailable) {
-            final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
             downloadButton
                     .setText(getString(
                             R.string.downloadButton,
@@ -574,6 +574,8 @@ public class DictionaryManagerActivity extends ActionBarActivity {
             builder.append(getString(R.string.indexInfo, indexInfo.shortName,
                     indexInfo.mainTokenCount));
         }
+        builder.append("; ");
+        builder.append(getString(R.string.downloadButton, downloadable.uncompressedBytes / 1024.0 / 1024.0));
         details.setText(builder.toString());
 
         if (canLaunch) {