mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-25 08:21:59 +01:00
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.
This commit is contained in:
parent
9396d41dcc
commit
e4a17562cb
@ -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));
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user