Skip to content

ntq-japan/FileChooser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileChooser

Demo a file chooser dialog in Android. This project base on Android Matterial Design

Versions

v1.0

Getting Started

Eazy way to call the FileChooser Dialog like a AlertDialog. Please note that don't forget to check the runtime permission.

Dependence:
compile 'ninja.lbs.filechooser:filechooser:1.0.0'
Demo code:
String dialogTag = FileChooserDialog.class.getName();
Fragment oldDialog = getFragmentManager().findFragmentByTag(dialogTag);
if (oldDialog == null) {
    FileChooserDialog.Builder builder = new FileChooserDialog.Builder();
    builder.setInitialDirectory(new File(""));
    final Set<String> ACCEPT_EXTENSIONS = new HashSet<>();
    ACCEPT_EXTENSIONS.add("pcm");
    builder.setAcceptExtensions(ACCEPT_EXTENSIONS);
    FileChooserDialog fileChooserDialog = builder.build();
    fileChooserDialog.show(getFragmentManager(), dialogTag);
}

License

Do whatever you want. However, I'm feel happy if this project helpful and please let me know by star it. T^T

Credit

About

Demo a file chooser dialog in Android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages