Skip to content

angjelkom/cordova-plugin-dialog-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-dialog-list

This is a cordova plugin which allows you to display a Native Dialog List on Android. NOTE: You must wait for the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(device.cordova);
}

Installation

cordova plugin add cordova-plugin-dialog-list

phonegap plugin add cordova-plugin-dialog-list

Usage

cordova.plugins.dialogList(success, error, title, array);

success - Success callback function, which returns index of the clicked list item.

error - Error callback function, which returns Error String

title - String for the Title of the Dialog List

array - Array of Strings which will be used as List in the Dialog

Example

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    cordova.plugins.dialogList(function(index){

      //index of the clicked item

      console.log(index);

      }, function(error){
          console.log(error);
        }, "Dialog Title", ["Item 1", "Item 2", "Item 3"]);
}

Supported Platforms

  • Android

Screenshot

About

Cordova Plugin for creating Native Dialog List

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published