diff --git a/.project b/.project
index 6a563a5..26c44aa 100644
--- a/.project
+++ b/.project
@@ -5,25 +5,8 @@
TiTouchGallery is a native Android module, which allows you to create a gallery view, with zoom (pinch / double tap) and pan support, in your Titanium Android app.
+This module is a fork of the android gallery widget from Dreddik with some changes.
+
Thanks Dreddik for share this.
To access this module from JavaScript, you would do the following:
+var titouchgallery = require("com.gbaldera.titouchgallery");
+
+The titouchgallery variable is a reference to the Module object.
+
Array of images to display in the gallery (Only Remote images are supported for now)
+ndex of the active page
+List of methods supported in this module:
+var proxy = titouchgallery.createTouchGallery({
+ images: [
+ "http://cs407831.userapi.com/v407831207/18f6/jBaVZFDhXRA.jpg",
+ "http://cs407831.userapi.com/v4078f31207/18fe/4Tz8av5Hlvo.jpg",
+ "http://cs407831.userapi.com/v407831207/1906/oxoP6URjFtA.jpg",
+ "http://cs407831.userapi.com/v407831207/190e/2Sz9A774hUc.jpg",
+ "http://cs407831.userapi.com/v407831207/1916/Ua52RjnKqjk.jpg",
+ "http://cs407831.userapi.com/v407831207/191e/QEQE83Ok0lQ.jpg"
+ ],
+ currentPage:2
+});
+
+Get the array with the images displayed in the gallery.
+None
+Set the array with the images to be displayed in the gallery.
+Adds a new image to the gallery
+Removes the specified image from the gallery
+Get the total number of images in the gallery.
+None
+Sets the current page to the next consecutive page in images.
+None
+Sets the current page to the previous consecutive page in images.
+None
+Gets the value of the currentPage property.
+None
+Sets the value of the currentPage property.
+Fired when the device detects a single tap against the view.
+Fired when the device detects a long press against this view.
+Fired when the gallery changed the page
+```
+var win = Ti.UI.createWindow({ + backgroundColor:'#000' +});
+var titouchgallery = require('com.gbaldera.titouchgallery');
+if (Ti.Platform.name == "android") { + var proxy = titouchgallery.createTouchGallery({ + images: [ + "http://cs407831.userapi.com/v407831207/18f6/jBaVZFDhXRA.jpg", + "http://cs407831.userapi.com/v4078f31207/18fe/4Tz8av5Hlvo.jpg", + "http://cs407831.userapi.com/v407831207/1906/oxoP6URjFtA.jpg", + "http://cs407831.userapi.com/v407831207/190e/2Sz9A774hUc.jpg", + "http://cs407831.userapi.com/v407831207/1916/Ua52RjnKqjk.jpg", + "http://cs407831.userapi.com/v407831207/191e/QEQE83Ok0lQ.jpg" + ] + }); + proxy.addEventListener("scroll", function(e){ + Ti.API.debug("Scroll event fired: " + JSON.stringify(e)); + }); + proxy.addEventListener("singletap", function(e){ + alert("Page: " + e.currentPage); + Ti.API.debug("SingleTap event fired: " + JSON.stringify(e)); + }); + proxy.addEventListener("longpress", function(e){ + alert("Page: " + e.currentPage); + Ti.API.debug("LongPress event fired: " + JSON.stringify(e)); + });
+win.add(proxy);
+
+}
+win.open();
+```
+Gustavo Rodriguez Baldera
+ +It's open source and it's under DBAD License
\ No newline at end of file diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/example/app.js b/dist/modules/android/com.gbaldera.titouchgallery/1.2/example/app.js new file mode 100644 index 0000000..f8efd31 --- /dev/null +++ b/dist/modules/android/com.gbaldera.titouchgallery/1.2/example/app.js @@ -0,0 +1,42 @@ +// This is a test harness for your module +// You should do something interesting in this harness +// to test out the module and to provide instructions +// to users on how to use it by example. + + +// open a single window +var win = Ti.UI.createWindow({ + backgroundColor:'#000' +}); + +var titouchgallery = require('com.gbaldera.titouchgallery'); +Ti.API.info("module is => " + JSON.stringify(titouchgallery)); + +if (Ti.Platform.name == "android") { + var proxy = titouchgallery.createTouchGallery({ + images: [ + "http://cs407831.userapi.com/v407831207/18f6/jBaVZFDhXRA.jpg", + "http://cs407831.userapi.com/v4078f31207/18fe/4Tz8av5Hlvo.jpg", + "http://cs407831.userapi.com/v407831207/1906/oxoP6URjFtA.jpg", + "http://cs407831.userapi.com/v407831207/190e/2Sz9A774hUc.jpg", + "http://cs407831.userapi.com/v407831207/1916/Ua52RjnKqjk.jpg", + "http://cs407831.userapi.com/v407831207/191e/QEQE83Ok0lQ.jpg" + ] + }); + proxy.addEventListener("scroll", function(e){ + Ti.API.debug("Scroll event fired: " + JSON.stringify(e)); + }); + proxy.addEventListener("singletap", function(e){ + alert("Page: " + e.currentPage); + Ti.API.debug("SingleTap event fired: " + JSON.stringify(e)); + }); + proxy.addEventListener("longpress", function(e){ + alert("Page: " + e.currentPage); + Ti.API.debug("LongPress event fired: " + JSON.stringify(e)); + }); + + win.add(proxy); +} + +win.open(); + diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi-v7a/libcom.gbaldera.titouchgallery.so b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi-v7a/libcom.gbaldera.titouchgallery.so new file mode 100644 index 0000000..980fe27 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi-v7a/libcom.gbaldera.titouchgallery.so differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi/libcom.gbaldera.titouchgallery.so b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi/libcom.gbaldera.titouchgallery.so new file mode 100644 index 0000000..bc8f910 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/armeabi/libcom.gbaldera.titouchgallery.so differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/x86/libcom.gbaldera.titouchgallery.so b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/x86/libcom.gbaldera.titouchgallery.so new file mode 100644 index 0000000..5237376 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/libs/x86/libcom.gbaldera.titouchgallery.so differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/manifest b/dist/modules/android/com.gbaldera.titouchgallery/1.2/manifest new file mode 100644 index 0000000..23f86c5 --- /dev/null +++ b/dist/modules/android/com.gbaldera.titouchgallery/1.2/manifest @@ -0,0 +1,18 @@ +# +# this is your module manifest and used by Titanium +# during compilation, packaging, distribution, etc. +# +version: 1.2 +apiversion: 2 +description: My module +author: Gustavo Rodriguez Baldera +license: Specify your license +copyright: Copyright (c) 2013 by Your Company +architectures: armeabi;armeabi-v7a;x86 + +# these should not be edited +name: titouchgallery +moduleid: com.gbaldera.titouchgallery +guid: 7b4dfc31-49a6-416f-88a0-1c50d1464cf3 +platform: android +minsdk: 3.1.0.GA diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/ic_launcher.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000..96a442e Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/ic_launcher.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/no_photo.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/no_photo.png new file mode 100644 index 0000000..52fb348 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-hdpi/no_photo.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/ic_launcher.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000..9923872 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/ic_launcher.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/no_photo.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/no_photo.png new file mode 100644 index 0000000..5d408ee Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-ldpi/no_photo.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/ic_launcher.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000..359047d Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/ic_launcher.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/no_photo.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/no_photo.png new file mode 100644 index 0000000..1bfc3fc Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-mdpi/no_photo.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/ic_launcher.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 0000000..71c6d76 Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/ic_launcher.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/no_photo.png b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/no_photo.png new file mode 100644 index 0000000..b891ddc Binary files /dev/null and b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/drawable-xhdpi/no_photo.png differ diff --git a/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/layout/main.xml b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/layout/main.xml new file mode 100644 index 0000000..7d62fbb --- /dev/null +++ b/dist/modules/android/com.gbaldera.titouchgallery/1.2/platform/android/res/layout/main.xml @@ -0,0 +1,13 @@ + +