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
var shareIntent = Ti.Android.createIntent({ | |
action : Ti.Android.ACTION_SEND, | |
type : 'text/plain', | |
url : 'your URL here' | |
}); | |
shareIntent.putExtra(Ti.Android.EXTRA_TEXT, args.news.link); | |
shareIntent.addCategory(Ti.Android.CATEGORY_DEFAULT); | |
actionBar.addShareAction({ |
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
var imageContainer = Ti.UI.createView({ | |
left: 0, | |
right: 0, | |
height: 155, // define the height of each image "row" | |
clipMode: OS_IOS ? Ti.UI.iOS.CLIP_MODE_ENABLED : null, // iOS specific clipMode property that needs to be enabled | |
backgroundColor: '#FFFFFF' | |
}); | |
imageContainer.add(Ti.UI.createImageView({ | |
image: utilities.getFirstImage(args.news.description), |
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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?w=files&flid=15801) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) | |
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip) | |
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip) | |
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
var webview = Ti.UI.createWebview({ | |
html: '[ PUT YOUR HTML HERE ]' | |
}) | |
webview.addEventListener('beforeload', function(e) { | |
if (e.url.toString().indexOf('http') != -1 || e.url.toString().indexOf('www') != -1) { | |
// you can also check for mailto:// | |
webview.stopLoading(true); | |
Ti.Platform.openURL(e.url); | |
}; |
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
var window = Ti.UI.createWindow({ | |
backgroundColor: 'black' | |
}); | |
var label = Ti.UI.createLabel({ | |
text: 'Hello World!', | |
color: '#ffffff' | |
}); | |
window.add(label); |