diff options
author | Anderson Mesquita <andersonvom@gmail.com> | 2019-04-26 09:53:17 -0400 |
---|---|---|
committer | Anderson Mesquita <andersonvom@gmail.com> | 2019-05-19 13:25:27 -0400 |
commit | e4a17562cb7d946a6b0893514fec4fd47de19826 (patch) | |
tree | c0d1ed8b4a37eeffff55a06a7feca5682aa78f3f | |
parent | 9396d41dccd16435b0a1e608475dd45d2471918d (diff) | |
download | AntennaPod-e4a17562cb7d946a6b0893514fec4fd47de19826.zip |
Improve space wording on choose data folder dialog
This makes it clear that the number refers to the **free** space left on
the device, as opposed to the total space available.
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/DataFolderAdapter.java | 6 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DataFolderAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DataFolderAdapter.java index f625dcc0c..636a23088 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DataFolderAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DataFolderAdapter.java @@ -27,12 +27,14 @@ public class DataFolderAdapter extends RecyclerView.Adapter<DataFolderAdapter.Vi private final ChooseDataFolderDialog.RunnableWithString selectionHandler; private final String currentPath; private final List<StoragePath> entries; + private final String freeSpaceString; private Dialog dialog; public DataFolderAdapter(Context context, ChooseDataFolderDialog.RunnableWithString selectionHandler) { this.entries = getStorageEntries(context); this.currentPath = getCurrentPath(); this.selectionHandler = selectionHandler; + this.freeSpaceString = context.getString(R.string.choose_data_directory_available_space); } @NonNull @@ -46,8 +48,10 @@ public class DataFolderAdapter extends RecyclerView.Adapter<DataFolderAdapter.Vi @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { StoragePath storagePath = entries.get(position); + String freeSpace = Converter.byteToString(storagePath.getAvailableSpace()); + holder.path.setText(storagePath.getShortPath()); - holder.size.setText(Converter.byteToString(storagePath.getAvailableSpace())); + holder.size.setText(String.format(freeSpaceString, freeSpace)); holder.progressBar.setProgress(storagePath.getUsagePercentage()); holder.root.setOnClickListener((View v) -> selectAndDismiss(storagePath)); holder.radioButton.setOnClickListener((View v) -> selectAndDismiss(storagePath)); diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index add2dfe14..2fc311756 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -644,6 +644,7 @@ <string name="choose_data_directory">Choose Data Folder</string> <string name="choose_data_directory_message">Please choose the base of your data folder. AntennaPod will create the appropriate sub-directories.</string> <string name="choose_data_directory_permission_rationale">Access to external storage is required to change the data folder</string> + <string name="choose_data_directory_available_space">%1$s free</string> <string name="create_folder_msg">Create new folder with name "%1$s"?</string> <string name="create_folder_success">Created new folder</string> <string name="create_folder_error_no_write_access">Cannot write to this folder</string> |