Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Dialog Properties

Angad Singh edited this page May 29, 2017 · 18 revisions

The DialogProperties class define properties of the Dialog. Various actions like selection, filtering are performed on these Properties.

Summary

Public constructors
DialogProperties()
Creates a DialogProperties reference which is a wrapper for all Properties of Dialog.
Public Variables Description
selection_mode int: Selection Mode defines whether a single of multiple Files/Directories have to be selected.
selection_type int: Selection Type defines whether a File/Directory or both of these has to be selected.
root File: The Parent/Root Directory. List of Files is populated from here. Can be set to any readable directory.
error_dir File: The Directory is used when Root Directory is not readable or accessible. /mnt is the default location.
offset File: The Directory can be used as an offset. It is the first directory that is shown in the dialog. Consider making it Root's sub-directory.
extensions String[]: An Array of String containing extensions, Files with only that will be shown. Others will be ignored.

Public Constructors

DialogProperties

DialogProperties()

Creates a DialogProperties reference which is a wrapper for all Properties of Dialog.

Initializes Dialog Properties to default values. ie.

  • Sets selection_mode to Single File/Directory Selection.
  • Sets selection_type to File.
  • Instantiates root with SDCard Location. ie. /mnt.
  • Instantiates error_dir with SDCard Location. ie. /mnt.
  • Initializes extensions with null.

Public Variables

selection_mode

Selection Mode defines whether a single of multiple Files/Directories has to be selected.

SINGLE_MODE and MULTI_MODE are the two selection modes, See DialogConfigs for more info. Is set to SINGLE_MODE as default value by constructor.

selection_type

Selection Type defines that whether a File/Directory or both of these has to be selected.

FILE_SELECT, DIR_SELECT, FILE_AND_DIR_SELECT are the three selection modes, See DialogConfigs for more info. Set to FILE_SELECT as default value by constructor.

root

The Parent/Root Directory. List of Files is populated from here. Can be set to any readable directory. '/mnt' is the default location. Note: You cannot go before/above root directory.

Eg. /sdcard

Eg. /mnt

error_dir

The Directory is used when Root Directory is not readable or accessible. '/mnt' is the default location. Note: You cannot go before/above root directory.

Eg. /sdcard

Eg. /mnt

offset

The Directory can be used as an offset. It is the first directory that is shown in the dialog. Consider making it Root's sub-directory.

Eg. Root: /sdcard

Eg. Offset: /sdcard/Music/Country

extensions

An Array of String containing extensions, Files with only that will be shown. Others will be ignored. Set to null as a default value by the constructor.

Eg. String ext = { "jpg", "jpeg", "png", "gif" };