* Addressing #899 and #898.
Added Subdirectory browsing
The previously selected folder is remembered.
The subdirectory is remembered for each syncthing folder.
The saved subdirectory in the sharedpreferences is deleted when a folder is deleted.
The root directory of the folderpicker activity is set to the synced folder, so the user can only choose a subfolder within the folder that is being synced.
The folderpicker activity was modified inorder to allow for a custom root directroy to be set.
* Addressing change requests.
Spelling and formatting.
* Addressing change requests.
- The saved folder subdirectory is now deleted in RestApi.removeFolder(),
this ensure that the data will be deleted no matter where removeFolder()
is called from.
- FolderPickerActivity.createIntentWithRootDir() removed and its functionality moved
to FolderPickerActivity.createIntent() inorder to simplify the code.
- getSharedPreference has been replaced with PreferenceManager.getDefaultSharedPreferences.
- When passing the directory to CopyFileTask getSavedSubdirectory() is now used, instead
of getting the text from the textview. This is cleaner and ensures that the same method us
used to get the saved subdirectory everywhere in the ShareActivity.
- File is used to combine the folder path and subdirectory path instead of strings.
This ensures that the paths are properly combined. As a result of this CopyFilesTask
has been modified so it accepts a File instead of a String.
* Addressing change requests
- Removed the preceding slash from the sub directory and added a trailing slash.
- TextView now diplays a message when no sub directory is selected.
- A separate browse button has been added.
* Fixes UI for all screen sizes in the share activity and adds helper method for formatting file
paths.
If there is not space for the save and cancel buttons then the view becomes scrollable
so the buttons can be reached.