├── AndroidManifest.xml ├── Arabic_locale_sample.png ├── Japan_locale_sample.png ├── LICENSE ├── README.md ├── libs ├── cwac-merge-1.0.4.jar └── picasso-2.4.0.jar ├── project.properties ├── res ├── drawable-hdpi │ ├── blank.png │ ├── btn_check_label_background.9.png │ ├── btn_check_off_holo_dark.png │ ├── btn_check_on_holo_dark.png │ ├── customcheckbox.xml │ ├── customcheckbox_background.xml │ ├── document.png │ ├── document_gray.png │ └── folder.png ├── drawable-ldpi │ ├── document.png │ ├── document_gray.png │ ├── folder.png │ └── ic_launcher.png ├── drawable-mdpi │ ├── document.png │ ├── document_gray.png │ ├── folder.png │ └── ic_launcher.png ├── drawable-xxhdpi │ └── ic_launcher.png ├── layout │ ├── activity_file_selection.xml │ ├── list_single.xml │ └── list_single_only.xml ├── menu │ └── main.xml ├── values-ar │ └── strings.xml ├── values-de │ └── strings.xml ├── values-es │ └── strings.xml ├── values-fr │ └── strings.xml ├── values-id │ └── strings.xml ├── values-it │ └── strings.xml ├── values-ja │ └── strings.xml ├── values-ko │ └── strings.xml ├── values-pt │ └── strings.xml ├── values-ru │ └── strings.xml ├── values-sw600dp │ └── dimens.xml ├── values-sw720dp-land │ └── dimens.xml ├── values-v11 │ └── styles.xml ├── values-v14 │ └── styles.xml ├── values-zh │ └── strings.xml └── values │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml ├── sample.png └── src └── paul └── arian └── fileselector ├── CheckableRelativeLayout.java ├── CustomList.java ├── CustomListSingleOnly.java ├── FileSelectionActivity.java └── FolderSelectionActivity.java /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Arabic_locale_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/Arabic_locale_sample.png -------------------------------------------------------------------------------- /Japan_locale_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/Japan_locale_sample.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Paul Asiimwe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android Multiple File Selector Dialog 2 | 3 | 4 | 5 | ###Introduction 6 | 7 | ![ScreenShot](https://raw.github.com/tapaulo/Android-Multiple-file-Selector-Dialog/master/sample.png) 8 | 9 | 10 | ![ScreenShot](https://raw.github.com/tapaulo/Android-Multiple-file-Selector-Dialog/master/Arabic_locale_sample.png) 11 | 12 | 13 | ![ScreenShot](https://raw.github.com/tapaulo/Android-Multiple-file-Selector-Dialog/master/Japan_locale_sample.png) 14 | 15 | **Supports API 8(+)** 16 | 17 | This is a free to use,change and reproduce Android Library file selector dialog whose birth arose from this question I posted on Stackoverflow 18 | 19 | http://stackoverflow.com/questions/22095441/android-multiple-file-selector-chooser-dialog 20 | 21 | This library starts a file/folder selector activity and returns the file(s) (Yes Multiple option too) or folder. 22 | Your contribution is highly welcome 23 | 24 | ###Features 25 | Thumbnails for Images 26 | 27 | Language support for English, Arabic, Simplified Chinese, German, French, Indonesian, Italian, Korean, Japanese, Russian, Spanish and Portuguese 28 | 29 | AutoScroll to last ScrollPosition on Back Pressed 30 | 31 | New Folder Button 32 | 33 | Button to access External/Internal Storage **not fully tested** :-) 34 | 35 | 36 | ###Usage 37 | Add these activities in your manifest Within the . 38 | ``` 39 | 40 | 42 | 44 | 45 | ``` 46 | Add this Permission too 47 | ``` 48 | 49 | ``` 50 | 51 | 52 | Then also **add merge 1.04.jar** and **picasso jar** located in the repo to this library's build path or module 53 | 54 | #### File Selector 55 | 56 | To start the fileSelector 57 | first import. 58 | ```java 59 | import paul.arian.fileselector.FileSelectionActivity; 60 | ``` 61 | use this code 62 | 63 | ```java 64 | Intent intent = new Intent(getBaseContext(), FileSelectionActivity.class); 65 | startActivityForResult(intent, 0); 66 | ``` 67 | 68 | To capture the result, use this method. 69 | 70 | ```java 71 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 72 | if(requestCode == 0 && resultCode == RESULT_OK){ 73 | ArrayList Files = (ArrayList) data.getSerializableExtra(FILES_TO_UPLOAD); //file array list 74 | String [] files_paths; //string array 75 | int i = 0; 76 | 77 | for(File file : Files){ 78 | //String fileName = file.getName(); 79 | String uri = file.getAbsolutePath(); 80 | files_paths[i] = uri.toString(); //storing the selected file's paths to string array files_paths 81 | i++; 82 | } 83 | }else{ 84 | } 85 | 86 | } 87 | 88 | ``` 89 | 90 | #### Folder Selector 91 | 92 | To start folder selection activity, 93 | 94 | import: 95 | ```java 96 | import paul.arian.fileselector.FolderSelectionActivity; 97 | ``` 98 | to start use this code. 99 | ```java 100 | Intent intent = new Intent(getBaseContext(), FolderSelectionActivity.class); 101 | startActivityForResult(intent, 2); 102 | ``` 103 | To capture, use this method. 104 | 105 | ``` 106 | protected void onActivityResult(int requestCode, int resultCode, Intent data) { 107 | if(requestCode == 2 && resultCode == RESULT_OK){ 108 | String FolderPath = data.getSerializableExtra(FILES_TO_UPLOAD).toString(); //The path of folder(directory) is stored in FolderPath string. 109 | } 110 | } 111 | ``` 112 | 113 | ###### Credits 114 | Massive credit goes to Arian JM of Madrid who created the majority of this library. 115 | 116 | Here is his Github: https://github.com/ArianJM 117 | 118 | Looking forward to your feedback, collaboration and assistence. 119 | 120 | regards, 121 | 122 | Paul Asiimwe, 123 | 124 | Kampala, Uganda, 125 | 126 | https://google.com/+PaulAsiimwe 127 | 128 | https://twitter.com/_paulasiimwe 129 | -------------------------------------------------------------------------------- /libs/cwac-merge-1.0.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/libs/cwac-merge-1.0.4.jar -------------------------------------------------------------------------------- /libs/picasso-2.4.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/libs/picasso-2.4.0.jar -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-19 15 | android.library=true 16 | -------------------------------------------------------------------------------- /res/drawable-hdpi/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/blank.png -------------------------------------------------------------------------------- /res/drawable-hdpi/btn_check_label_background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/btn_check_label_background.9.png -------------------------------------------------------------------------------- /res/drawable-hdpi/btn_check_off_holo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/btn_check_off_holo_dark.png -------------------------------------------------------------------------------- /res/drawable-hdpi/btn_check_on_holo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/btn_check_on_holo_dark.png -------------------------------------------------------------------------------- /res/drawable-hdpi/customcheckbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | -------------------------------------------------------------------------------- /res/drawable-hdpi/customcheckbox_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /res/drawable-hdpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/document.png -------------------------------------------------------------------------------- /res/drawable-hdpi/document_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/document_gray.png -------------------------------------------------------------------------------- /res/drawable-hdpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-hdpi/folder.png -------------------------------------------------------------------------------- /res/drawable-ldpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-ldpi/document.png -------------------------------------------------------------------------------- /res/drawable-ldpi/document_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-ldpi/document_gray.png -------------------------------------------------------------------------------- /res/drawable-ldpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-ldpi/folder.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-mdpi/document.png -------------------------------------------------------------------------------- /res/drawable-mdpi/document_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-mdpi/document_gray.png -------------------------------------------------------------------------------- /res/drawable-mdpi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-mdpi/folder.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paulasiimwe/Android-Multiple-file-Selector-Dialog/15a4c0a89084294482e0f0caa6c0e98c3e142929/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/layout/activity_file_selection.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 |