https://github.com/bearded-hen/bhfilebrowser
A file chooser for Android applications using FontAwesome icons.
https://github.com/bearded-hen/bhfilebrowser
Last synced: 9 months ago
JSON representation
A file chooser for Android applications using FontAwesome icons.
- Host: GitHub
- URL: https://github.com/bearded-hen/bhfilebrowser
- Owner: Bearded-Hen
- License: mit
- Created: 2015-03-06T16:16:36.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-10T17:47:56.000Z (almost 11 years ago)
- Last Synced: 2025-03-22T01:24:45.785Z (10 months ago)
- Language: Java
- Homepage:
- Size: 444 KB
- Stars: 10
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
README
# BHFileBrowser

### BHFileBrowser
BHFileBrowser is a simple file chooser for Android applications that uses FontAwesome icons. There are several configurable options, such as file extension filtering, displaying hidden files, and whether directories or files can be selected.
### Getting Started
Add the following line to your build.gradle file.
```java
dependencies {
compile 'com.beardedhen:bhfilebrowser:+'
}
```
### Using the library
You can either use a FileBrowserActivity:
```java
Intent intent = new Intent(MainActivity.this, FileBrowserActivity.class);
intent.putExtra(Actions.FB_START_DIR, "/");
intent.putExtra(Actions.FB_SHOW_HIDDEN_FILES, true);
intent.putExtra(Actions.FB_SELECT_MODE, SelectMode.DIR);
intent.putExtra(Actions.FB_FILE_EXTENSIONS, filterExtension);
intent.putExtra(Actions.FB_BROWSER_TITLE, "Pick any file");
startActivityForResult(intent, REQUEST_CODE);
```
Or a FileBrowserDialog:
```java
ArrayList filterExtension = new ArrayList<>();
filterExtension.add("apk");
Bundle bundle = new Bundle();
bundle.putString(Actions.FB_START_DIR, "/");
bundle.putBoolean(Actions.FB_SHOW_HIDDEN_FILES, true);
bundle.putSerializable(Actions.FB_SELECT_MODE, SelectMode.FILE);
bundle.putStringArrayList(Actions.FB_FILE_EXTENSIONS, filterExtension);
bundle.putString(Actions.FB_BROWSER_TITLE, "Custom File Dialog");
dialog = FileBrowserDialog.newInstance(bundle, MainActivity.this);
dialog.show(getSupportFragmentManager(), null);
```
### Issues/Contributing
If you discover a bug/enhancement or just have a question, please create a ticket in the issue tracker. Be sure to include reproduction steps and if relevant Android version/model.