A simple file/ directory picker dialog for android

Overview

FileListerDialog

FileListerDialog helps you to list and pick file/directory. Library is built for Android

Getting Started

Installing

To use this library simply import it by placing the following line under dependencies in your app module's build.gradle file

This library is posted in jCenter

   dependencies {
      implementation 'yogesh.firzen:FilesLister:2.0.12'
   }

If any problem occured while importing please add this line to your app module's build. gradle file

   repositories {
      maven {url "https://dl.bintray.com/firzenyogesh/maven"}
   }

This library has dependencies

   dependencies {
      implementation 'androidx.appcompat:appcompat:1.0.2'
      implementation 'com.google.android.material:material:1.0.0'
      implementation 'androidx.recyclerview:recyclerview:1.0.0'
      implementation 'yogesh.firzen:MukkiyaSevaigal:3.0.8'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
   }

Usage

After importing the library you can use FileListerDialog to list the files and pick one among them. Simply follow the steps

  1. Create an instance of FileListerDialog by using the static method createFileListerDialog()

    Default Instance:

       FileListerDialog fileListerDialog = FileListerDialog.createFileListerDialog(context);
    

    Instance with a theme for Dialog:

       FileListerDialog fileListerDialog = FileListerDialog.createFileListerDialog(context, themeId);
    
  2. Set OnFileSelectedListener so that you get what file/ directory has been selected

       filelister.setOnFileSelectedListener(new OnFileSelectedListener() {
             @Override
             public void onFileSelected(File file, String path) {
                   //your code here
             }
       });
    
  3. Set the default directory to load when showing the dialog:

    Using a file

       fileListerDialog.setDefaultDir(file);
    

    Using a file path

       fileListerDialog.setDefaultDir(path);
    
  4. Set the File Filter type to filter the type of files to be listed:

       fileListerDialog.setFileFilter(FileListerDialog.FILE_FILTER.ALL_FILES);
    

    Possible values are:

       FileListerDialog.FILE_FILTER.ALL_FILES
       FileListerDialog.FILE_FILTER.DIRECTORY_ONLY
       FileListerDialog.FILE_FILTER.IMAGE_ONLY
       FileListerDialog.FILE_FILTER.VIDEO_ONLY
       FileListerDialog.FILE_FILTER.AUDIO_ONLY
       FileListerDialog.FILE_FILTER.ALL_MEDIA
       FileListerDialog.FILE_FILTER.DOCUMENT_ONLY
       FileListerDialog.FILE_FILTER.SPREADSHEET_ONLY
       FileListerDialog.FILE_FILTER.PRESENTATION_ONLY
       FileListerDialog.FILE_FILTER.ALL_DOCUMENTS
       FileListerDialog.FILE_FILTER.COMPRESSED_ONLY
       FileListerDialog.FILE_FILTER.APK_ONLY
       FileListerDialog.FILE_FILTER.CUSTOM_EXTENSION
    
  5. Finally call show() to open the dialog.

       fileListerDialog.show();
    

Screenshots

FileListerDialog

Create a new folder

When a Directory is picked

When a file is picked

Authors

License

Copyright 2017 Yogesh Sundaresan

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.
Comments
  • Error when selecting a folder

    Error when selecting a folder

    When I select a folder in the dialog, app crashes with:

    Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.commons.io.FilenameUtils" on path: DexPathList[[zip file "/data/app/com.myApp-F0_sdB_QRzZKIKky8gOrAA==/base.apk"],nativeLibraryDirectories=[/data/app/com.myApp-F0_sdB_QRzZKIKky8gOrAA==/lib/arm64, /data/app/com.myApp-F0_sdB_QRzZKIKky8gOrAA==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]

    I have apache commons library imposed in my project. Any ideas what could cause that?

    opened by nikitagudkovs 3
  • Name of file in dialog

    Name of file in dialog

    Re Hello, Is It possible to change a feature : Now : when click on file : it open a new dialog to select, cancel, default dir and the name of this dialog is "select file" I think it whil be better with the file name selected. Thank you to tell me if it's possible, it's not a big custom. A+ Eric

    opened by ELN44 0
  • Crash when last file is chosen

    Crash when last file is chosen

    Hello, Very good project, thank's very much. i have un problem when I swipe up the list, when arrive the last file my application crash. it's not on select the file it's when I swipe up toward the last file of the list. Thank's for Answer... Eric

    opened by ELN44 0
  • No text visible

    No text visible

    I tried to use this library! (implementation 'yogesh.firzen:FilesLister:2.0.12')

    Everything seems to work but the file, folder text. See the screenshot. Screenshot_20190829-204959

    opened by chanakasat 3
  • NoClassDefFoundError: yogesh.firzen.filelister.FilesListerView

    NoClassDefFoundError: yogesh.firzen.filelister.FilesListerView

    java.lang.NoClassDefFoundError: yogesh.firzen.filelister.FilesListerView at yogesh.firzen.filelister.FileListerDialog.init(FileListerDialog.java:87) at yogesh.firzen.filelister.FileListerDialog.(FileListerDialog.java:56) at yogesh.firzen.filelister.FileListerDialog.createFileListerDialog(FileListerDialog.java:72)

    opened by addewyd 0
Owner
Yogesh S
Yogesh S
Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

# Media Recorder Dialog ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/badge/Android-CustomView-blue.sv

Abdullah Alhazmy 73 Nov 29, 2022
ionalert 1.3 1.6 Java Sweetalert, Dialog, Alert Dialog

ionalert - Android Alert Dialog A beautiful design Android Alert Dialog, alternative of Sweet Alert Dialog based on KAlertDialog using MaterialCompone

Excel Dwi Oktavianto 23 Sep 17, 2022
Alert Dialog - You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment.

We show a warning message (Alert Dialog) to the user in many parts of our applications. You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment. Thanks to this extension, you can create a Dialog and call it in the Activity or Fragment you want and customize the component you want.

Gökmen Bayram 0 Jan 9, 2022
A simple library to show custom dialog with animation in android

SmartDialog A simple library to show custom dialog in android Step 1. Add the JitPack repository to your build file allprojects { repositories {

claudysoft 9 Aug 18, 2022
AlertDialog for Android, a beautiful and material alert dialog to use in your android app.

AlertDialog for Android, a beautiful and material alert dialog to use in your android app. Older verion of this library has been removed

Akshay Masram 124 Dec 28, 2022
Advanced dialog solution for android

DialogPlus Simple and advanced dialog solution. Uses normal view as dialog Provides expandable option Multiple positioning Built-in options for easy i

Orhan Obut 5k Dec 29, 2022
SweetAlert for Android, a beautiful and clever alert dialog

Sweet Alert Dialog SweetAlert for Android, a beautiful and clever alert dialog 中文版 Inspired by JavaScript SweetAlert Demo Download ScreenShot Setup Th

书呆子 7.3k Dec 30, 2022
An Android Dialog Lib simplify customization.

FlycoDialog-Master 中文版 An Android Dialog Lib simplify customization. Supprot 2.2+. Features [Built-in Dialog, convenient to use](#Built-in Dialog) [Ab

Flyco 2.3k Dec 8, 2022
[Deprecated] This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.

Deprecated Please use android.support.v7.app.AlertDialog of support-v7. AlertDialogPro Why AlertDialogPro? Theming Android's AlertDialog is not an eas

Feng Dai 468 Nov 10, 2022
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

Keisuke Kobayashi 553 Nov 23, 2022
a quick custom android dialog project

QustomDialog Qustom helps you make quick custom dialogs for Android. All this is, for the time being, is a way to make it easy to achieve the Holo loo

Daniel Smith 183 Nov 20, 2022
Android library that allows applications to add dialog-based slider widgets to their settings

Android Slider Preference Library Overview Slider represents a float between 0.0 and 1.0 Access with SliderPreference.getValue() or SharedPreferences.

Jay Petacat 135 Nov 29, 2022
An Android library for displaying a dialog where it presents new features in the app.

WhatIsNewDialog What is new dialog for Android is used for presenting new features in the the app. It can be used in the activity starts, from menu or

NonZeroApps 22 Aug 23, 2022
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

Keisuke Kobayashi 553 Nov 23, 2022
AlertDialog - Explain about Alert Dialog in Android

AndroidTemplate I got a problem to create Android project with Java 11 and anoth

Monthira Chayabanjonglerd 1 Feb 13, 2022
An beautiful and easy to use dialog library for Android

An beautiful and easy to use dialog library for Android

ShouHeng 22 Nov 8, 2022
CuteDialog- Android Custom Material Dialog Library

A Custom Material Design Dialog Library for Android Purpose CuteDialog is a Highly Customizable Material Design Android Library. CuteDialog allows dev

CuteLibs - Smart & Beautiful Android Libraries 7 Dec 7, 2022
An easy to use, yet very customizable search dialog

search-dialog An awesome and customizable search dialog with built-in search options. Usage First add jitpack to your projects build.gradle file allpr

Mad Mirrajabi 518 Dec 15, 2022
Common dialog fragments

Common dialog fragments

null 6 Aug 29, 2022