{"id":13643322,"url":"https://github.com/leonHua/LFilePicker","last_synced_at":"2025-04-21T01:32:24.035Z","repository":{"id":37432220,"uuid":"85556526","full_name":"leonHua/LFilePicker","owner":"leonHua","description":"Android 检索手机目录方式的文件选择器，轻量且界面友好，定制性高。This is a lightweight file selector, it can select files by retrieve phone directory","archived":false,"fork":false,"pushed_at":"2023-09-23T06:11:42.000Z","size":3352,"stargazers_count":1099,"open_issues_count":39,"forks_count":214,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-09T04:08:03.643Z","etag":null,"topics":["android","file","filepicker"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonHua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-03-20T09:13:03.000Z","updated_at":"2025-03-19T05:29:06.000Z","dependencies_parsed_at":"2022-08-08T20:15:53.930Z","dependency_job_id":"aaed24c9-439b-46b5-a72f-4e587fad04c7","html_url":"https://github.com/leonHua/LFilePicker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonHua%2FLFilePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonHua%2FLFilePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonHua%2FLFilePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonHua%2FLFilePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonHua","download_url":"https://codeload.github.com/leonHua/LFilePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249982608,"owners_count":21355732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","file","filepicker"],"created_at":"2024-08-02T01:01:45.826Z","updated_at":"2025-04-21T01:32:19.712Z","avatar_url":"https://github.com/leonHua.png","language":"Java","readme":"----------\n### [中文文档](README_CH.md)\nThis is a lightweight file selector, it can select files by retrieve phone directory. At the same time contains：\n\n - A variety of interface style\n - Support file multiple-choice or radio\n - Support the file type filter\n - Support the fragments\n - custom title text and color\n - Internationalization (switch in both Chinese and English)\n - Maximum quantity limitation (withMaxNum)\n - All or all cancel\n - File size filtering\n - Default path specified\n\n### version update：\n #### V1.8.0\n #### V1.7.0\n  - Adds an interface to specify the initial display path.\n  - The added interface can filter the file size, larger than the specified size, or less than the specified size.\n #### V1.6.0\n  - Add folder path selection\n #### V1.5.0\n  - Select check to avoid duplication of data\n  - Single mode does not show full selection operation\n #### V1.4.0\n - Maximum quantity limitation\n - All or all cancel\n\n### Running effect：\n#### dynamic effect（If the picture can't display properly, you can view the screenshot GIF files in the folder）\n![](screenshot/操作.gif)\n#### the page：\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-132717.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-133458.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-133811.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-133831.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-133836.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-133844.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-134316.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-134327.png\"/\u003e\n\u003cimg width=\"360px\" src=\"screenshot/Screenshot_20170330-134333.png\"/\u003e\n\n### Quick to use\n#### 1. add reference\n    compile 'com.leon:lfilepickerlibrary:1.8.0'\n\n#### 2. add permission\n\n    \u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e\n   \n    \n#### 3. open Activity\n    int REQUESTCODE_FROM_ACTIVITY = 1000;\n    new LFilePicker()\n                .withActivity(MainActivity.this)\n                .withRequestCode(REQUESTCODE_FROM_ACTIVITY)\n                 .withStartPath(\"/storage/emulated/0/Download\")\n                 .withIsGreater(false)\n                 .withFileSize(500 * 1024)\n                .start();\n                \n#### 4. accept the results of the return\n\n    @Override\n    protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n        super.onActivityResult(requestCode, resultCode, data);\n        if (resultCode == RESULT_OK) {\n            if (requestCode == REQUESTCODE_FROM_ACTIVITY) {\n               //If it is a file selection mode, you need to get the path collection of all the files selected\n                //List\u003cString\u003e list = data.getStringArrayListExtra(Constant.RESULT_INFO);//Constant.RESULT_INFO == \"paths\"\n                List\u003cString\u003e list = data.getStringArrayListExtra(\"paths\");\n                Toast.makeText(getApplicationContext(), \"selected \" + list.size() , Toast.LENGTH_SHORT).show();\n                //If it is a folder selection mode, you need to get the folder path of your choice\n                String path = data.getStringExtra(\"path\");\n                Toast.makeText(getApplicationContext(), \"The selected path is:\" + path, Toast.LENGTH_SHORT).show();\n            }\n        }\n    }\n    \n### Interface methods\n#### method statement\n| method        | statement   |\n| --------   | --------- |\n| withActivity(Activity activity)   |bind Activity|\n| withFragment(Fragment fragment)   |bind Fragment|\n| withSupportFragment(Fragment supportFragment)|bind V4 Fragment|\n| withRequestCode(int requestCode)  |set the request code|\n| withTitle(String title)           |Set the title|\n| withTitleColor(String color)      |Set the title color|\n| withBackgroundColor(String color) |Set the title background color|\n| withIconStyle(int style)          |set the list icon style|\n| withBackIcon(int backStyle)       |set back icon style|\n| withFileFilter(String[] arrs)     |set the file type filter|\n| withMutilyMode(boolean isMutily)  |setting a multiple-choice or radio mode|\n| withAddText(String text)          |set the multiselect mode selected text|\n| withNotFoundBooks(String text)    |Set the prompt information when no file selected|\n| withMaxNum(int num)               |Set the max number of files|\n| withChooseMode(boolean chooseMode)|Set the folder selection mode, true (default) to select file, false to select folder|\n| withStartPath(String path)        |Set the initial display path|\n| withIsGreater(boolean isGreater)  |Set the filter mode,true(default) is greater than the specified size, or false less than the specified size|\n| withFileSize(long size)           |Set the size of the specified filter file, and if it is 500K, enter 500*1024|\n#### Provide style\n\n **withIconStyle(int style)** Value model：\n - Constant.ICON_STYLE_YELLOW\n - Constant.ICON_STYLE_BLUE\n - Constant.ICON_STYLE_GREEN\n \n **withBackIcon(int backStyle)** Value model：\n - Constant.BACKICON_STYLEONE\n - Constant.BACKICON_STYLETWO\n - Constant.BACKICON_STYLETHREE\n \n  **withFileFilter(String[] arrs)** Value model：\n\n     withFileFilter(new String[]{\".txt\", \".png\", \".docx\"})\n     \n### More detailed usage：[简书：LFilePicker---文件选择利器，各种样式有它就够了](http://www.jianshu.com/p/eeb211e190be)\n \n### Thanks\n - [AndroidUtilCode][1]\n - [MaterialFilePicker][2]\n\n\n----------\nIf the library is useful to you, welcome to star or fork!\nWelcome to visit [blog] [3] for more articles.\n\n## License\n\nCopyright (C) 2017 leonHua\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n  [1]: https://github.com/Blankj/AndroidUtilCode\n  [2]: https://github.com/nbsp-team/MaterialFilePicker\n  [3]: https://leonhua.github.io/\n","funding_links":[],"categories":["选择器(Picker)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FleonHua%2FLFilePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FleonHua%2FLFilePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FleonHua%2FLFilePicker/lists"}