From 60b0be32968aef298368fc3ab916bc49699ff5c6 Mon Sep 17 00:00:00 2001 From: Luiz Filipe Machado Barni Date: Fri, 12 May 2017 16:55:10 -0300 Subject: [PATCH] Update README.md * fixed coding styles. * removed LICENSE from README since GitHub shows the license on the repo's page based on the LICENSE file. --- README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 23b8ac5..431e858 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,13 @@ A module with the missing native Android dialogs. ## Install -The modules/zip files is in the the `dist` folder of the repository. Add it to your project like you would any other native module. +The `modules/zip` files is in the the `dist` folder of the repository. Add it to your project like you would any other native module. Require the modules with the following code: -~~~ +```javascript var Dialogs = require("yy.tidialogs"); -~~~ - +``` ## Usage @@ -27,7 +26,7 @@ var Dialogs = require("yy.tidialogs"); Here is an example usage: -~~~ +```javascript // Create the dialog var picker = Dialogs.createMultiPicker({ @@ -39,8 +38,8 @@ var picker = Dialogs.createMultiPicker({ okButtonTitle : "Yep", // <-- optional cancelButtonTitle : "Nah" // <-- optional onChange : function(evt) { // <-- optional - console.log("index="+ "evt.index + " checked=" + evt.checked) -} + console.log("index=" + evt.index + " checked=" + evt.checked) + } }); // Add the click listener @@ -61,13 +60,13 @@ var onChange = function(evt) { // open it picker.show(); -~~~ +``` ### Date Picker Here is an example usage: -~~~ +```javascript // Create the dialog // value property is priority @@ -97,13 +96,13 @@ picker.addEventListener('cancel', function() { // open it picker.show(); -~~~ +``` ### Time Picker Here is an example usage: -~~~ +```javascript // Create the dialog // value property is priority @@ -131,13 +130,9 @@ picker.addEventListener('cancel', function() { // open it picker.show(); -~~~ - +``` ## Changelog * Added cancel button are displayed, Honeycomb later. * Added okButtonTitle, cancelButtonTitle and value properties. * Compatible Ti.UI.Picker.showTimePickerDialog and Ti.UI.Picker.showDatePickerDialog properties. - - -### Licence: MIT