An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# BHFileBrowser

![alt text](https://github.com/Bearded-Hen/BHFileBrowser/blob/master/wiki/bhbrowser.png "Device Image")

### 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.