This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cachedImageView = function(basedir, uri, obj, attr, cacheage) { | |
/** | |
Appcelerator Titanium ImageView /w cache | |
This function attempts to cache a remote image and then returns it again | |
when it's requested. | |
The file is stored in a directory "basedir," this is to try and help | |
you keep files unique. It's not special or magical, but not dirty either. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This app uses RGraph library to build Android-compatible pie charts using Titanium Mobile. | |
Brief screencast to demo functionality: | |
http://youtu.be/itTEwQmvNfY?hd=1 | |
This was for a work prototype/mockup, so excuse the esoteric text labels and fake activity indicator. | |
I borrowed heavily from prior art. | |
Aaron Saunder's "Titanium Appcelerator Quickie: Google Charts and Appcelerator" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function privateDocumentsDirectory(){ | |
Ti.API.info('We need to open a file object to get our directory info'); | |
var testFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory); | |
Ti.API.info('Now we remove the Documents folder reference'); | |
var privateDir = testFile.nativePath.replace('Documents/',''); | |
Ti.API.info('This is our base App Directory =' + privateDir); | |
Ti.API.info('Now we add the Private Documents Directory'); | |
privateDir+='Library/Private%20Documents/'; | |
Ti.API.info('Our new path is ' + privateDir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bb.cascades 1.0 | |
import bb.data 1.0 // don't forget to add "LIBS += -lbbdata" to your .pro file! | |
Page { | |
id: pgDetail | |
actions: [ | |
ActionItem { | |
title: qsTr("Refresh") | |
onTriggered: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add all items to collection | |
Alloy.Collections.Fugitive.reset([{ | |
"name" : "Jeff Haynie" | |
}, { | |
"name" : "Nolan Wright" | |
}, { | |
"name" : "Don Thorp" | |
}, { | |
"name" : "Marshall Culpepper" | |
}, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Save pkpass to PassWallet | |
* See http://passwallet.attidomobile.com/PassWallet%20Developer%20Guide.pdf | |
* | |
*/ | |
function shareToPassWallet () { | |
var pkpassFile, | |
intent, |