Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Titanium Image Gallery for iPhone and iPad

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 Module
Octocat-spinner-32 Resources
Octocat-spinner-32 .gitignore
Octocat-spinner-32 CHANGELOG.txt
Octocat-spinner-32 LICENSE
Octocat-spinner-32 LICENSE.txt
Octocat-spinner-32 README
Octocat-spinner-32 README.markdown
Octocat-spinner-32 api.jsca
Octocat-spinner-32 manifest
Octocat-spinner-32 tiapp.xml
README.markdown

Titanium Image Gallery

Example implementation of an Image Gallery for Titanium Mobile. It runs on iOS and Android platforms.

Created by:

Use as a Titanium module

Install the module

  1. Run Module/ios/imagegallery/build.py or ant Module/android/imagegallery which creates your distribution or click Downloads and select your download
  2. cd to /Library/Application Support/Titanium
  3. copy this zip file into the folder of your Titanium SDK

Register the module

Register your module with your application by editing tiapp.xml and adding your module. Example:

<modules>
    <module version="{VERSION_NUMBER}" platform="iphone">com.codeboxed.imagegallery</module>
    <module version="{VERSION_NUMBER}" platform="android">com.codeboxed.imagegallery</module>
</modules>

When you run your project, the compiler will know automatically compile in your module dependencies and copy appropriate image assets into the application.

Use the module

// Import ImageGallery module
var ImageGallery = require('com.codeboxed.imagegallery');

var win = Ti.UI.currentWindow;

// Array with image objects
var imagesArray = [
    {path:'1.jpg', caption:'Kitten 1'},
    {path:'2.jpg', caption:'Kitten 2'}
];

// Initialize the Image Gallery
var imageGallery = ImageGallery.create({
    images: imagesArray,
    columns: 4, // Set the numbers of columns (optional). Default is 4
    thumbSize: 75, // Set the thumb image size (optional). Default is 75
    thumbPadding: 5 // Set the thumb image padding (optional). Default is 5 
});

// Add it to the current window
win.add(imageGallery);

Notes

  • For an example on how to integrate the modules, check the Titanium mobile project included in the repo.
  • If you have any suggestions or bug reports, open a GitHub Issue.
  • If you have in mind any fixes/improvements, please feel free to contribute to the project.
  • Android is not supported any longer. It works with 1.6.x and hopefully will be supported again in the future.
Something went wrong with that request. Please try again.