All Projects → leonHua → Lfilepicker

leonHua / Lfilepicker

Android 检索手机目录方式的文件选择器,轻量且界面友好,定制性高。This is a lightweight file selector, it can select files by retrieve phone directory

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Lfilepicker

Simple Http Server
Simple http server in Rust (Windows/Mac/Linux)
Stars: ✭ 428 (-53.68%)
Mutual labels:  file
Cj Upload
Higher order React components for file uploading (with progress) react file upload
Stars: ✭ 589 (-36.26%)
Mutual labels:  file
A File Icon
Sublime Text File-Specific Icons for Improved Visual Grepping
Stars: ✭ 767 (-16.99%)
Mutual labels:  file
Aria
下载可以很简单
Stars: ✭ 4,777 (+416.99%)
Mutual labels:  file
Filemasta
A search application to explore, discover and share online files
Stars: ✭ 571 (-38.2%)
Mutual labels:  file
Chibisafe
Blazing fast file uploader and awesome bunker written in node! 🚀
Stars: ✭ 657 (-28.9%)
Mutual labels:  file
Cpx
A cli tool to watch and copy file globs.
Stars: ✭ 394 (-57.36%)
Mutual labels:  file
Eager Image Loader
The eager-loading for image files on the web page that loads the files according to your plan. This differs from the lazy-loading, for example, this can be used to avoid that the user waits for the loading.
Stars: ✭ 22 (-97.62%)
Mutual labels:  file
Filegator
Powerful Multi-User File Manager
Stars: ✭ 587 (-36.47%)
Mutual labels:  file
Coc Explorer
📁 Explorer for coc.nvim
Stars: ✭ 722 (-21.86%)
Mutual labels:  file
Polo
Advanced file manager for Linux written in Vala. Supports multiple panes (single, dual, quad) with multiple tabs in each pane. Supports archive creation, extraction and browsing. Support for cloud storage; running and managing KVM images, modifying PDF documents and image files, booting ISO files in KVM, and writing ISO files to USB drives.
Stars: ✭ 481 (-47.94%)
Mutual labels:  file
Pomf
Simple file uploading and sharing
Stars: ✭ 535 (-42.1%)
Mutual labels:  file
Android
An Open-Source Android application that allows you to send and receive files over available connections, and offers unique features like sharing over HTTP, pausing and resuming transfers
Stars: ✭ 695 (-24.78%)
Mutual labels:  file
Rxfile
Rx methods to get a File and Image or Video thumbnails from a Document Provider on Android (Drive, Dropbox etc)
Stars: ✭ 452 (-51.08%)
Mutual labels:  file
Aetherupload Laravel
A Laravel package to upload large files 上传大文件的Laravel扩展包
Stars: ✭ 835 (-9.63%)
Mutual labels:  file
Sonatamediabundle
Symfony SonataMediaBundle
Stars: ✭ 415 (-55.09%)
Mutual labels:  file
Boltons
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.
Stars: ✭ 5,671 (+513.74%)
Mutual labels:  file
Androidexplorer
An Android file explore like RootExplorer
Stars: ✭ 23 (-97.51%)
Mutual labels:  file
Xml Comp
Compare ANY markup documents.
Stars: ✭ 16 (-98.27%)
Mutual labels:  file
Send
Streaming static file server with Range and conditional-GET support
Stars: ✭ 696 (-24.68%)
Mutual labels:  file

中文文档

This is a lightweight file selector, it can select files by retrieve phone directory. At the same time contains:

  • A variety of interface style
  • Support file multiple-choice or radio
  • Support the file type filter
  • Support the fragments
  • custom title text and color
  • Internationalization (switch in both Chinese and English)
  • Maximum quantity limitation (withMaxNum)
  • All or all cancel
  • File size filtering
  • Default path specified

version update:

V1.8.0

V1.7.0

  • Adds an interface to specify the initial display path.
  • The added interface can filter the file size, larger than the specified size, or less than the specified size.

V1.6.0

  • Add folder path selection

V1.5.0

  • Select check to avoid duplication of data
  • Single mode does not show full selection operation

V1.4.0

  • Maximum quantity limitation
  • All or all cancel

Running effect:

dynamic effect(If the picture can't display properly, you can view the screenshot GIF files in the folder)

the page:

Quick to use

1. add reference

compile 'com.leon:lfilepickerlibrary:1.8.0'

2. add permission

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

3. open Activity

int REQUESTCODE_FROM_ACTIVITY = 1000;
new LFilePicker()
            .withActivity(MainActivity.this)
            .withRequestCode(REQUESTCODE_FROM_ACTIVITY)
             .withStartPath("/storage/emulated/0/Download")
             .withIsGreater(false)
             .withFileSize(500 * 1024)
            .start();

4. accept the results of the return

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (resultCode == RESULT_OK) {
        if (requestCode == REQUESTCODE_FROM_ACTIVITY) {
           //If it is a file selection mode, you need to get the path collection of all the files selected
            //List<String> list = data.getStringArrayListExtra(Constant.RESULT_INFO);//Constant.RESULT_INFO == "paths"
            List<String> list = data.getStringArrayListExtra("paths");
            Toast.makeText(getApplicationContext(), "selected " + list.size() , Toast.LENGTH_SHORT).show();
            //If it is a folder selection mode, you need to get the folder path of your choice
            String path = data.getStringExtra("path");
            Toast.makeText(getApplicationContext(), "The selected path is:" + path, Toast.LENGTH_SHORT).show();
        }
    }
}

Interface methods

method statement

method statement
withActivity(Activity activity) bind Activity
withFragment(Fragment fragment) bind Fragment
withSupportFragment(Fragment supportFragment) bind V4 Fragment
withRequestCode(int requestCode) set the request code
withTitle(String title) Set the title
withTitleColor(String color) Set the title color
withBackgroundColor(String color) Set the title background color
withIconStyle(int style) set the list icon style
withBackIcon(int backStyle) set back icon style
withFileFilter(String[] arrs) set the file type filter
withMutilyMode(boolean isMutily) setting a multiple-choice or radio mode
withAddText(String text) set the multiselect mode selected text
withNotFoundBooks(String text) Set the prompt information when no file selected
withMaxNum(int num) Set the max number of files
withChooseMode(boolean chooseMode) Set the folder selection mode, true (default) to select file, false to select folder
withStartPath(String path) Set the initial display path
withIsGreater(boolean isGreater) Set the filter mode,true(default) is greater than the specified size, or false less than the specified size
withFileSize(long size) Set the size of the specified filter file, and if it is 500K, enter 500*1024

Provide style

withIconStyle(int style) Value model:

  • Constant.ICON_STYLE_YELLOW
  • Constant.ICON_STYLE_BLUE
  • Constant.ICON_STYLE_GREEN

withBackIcon(int backStyle) Value model:

  • Constant.BACKICON_STYLEONE
  • Constant.BACKICON_STYLETWO
  • Constant.BACKICON_STYLETHREE

withFileFilter(String[] arrs) Value model:

 withFileFilter(new String[]{".txt", ".png", ".docx"})

More detailed usage:简书:LFilePicker---文件选择利器,各种样式有它就够了

Thanks


If the library is useful to you, welcome to star or fork! Welcome to visit [blog] 3 for more articles.

License

Copyright (C) 2017 leonHua

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].