- Grab the latest version of the module from https://github.com/ricardoalcocer/actionbarextras/tree/master/dist
- Create a new Alloy project and use this file as index.js. This code is using the Chunkfive.otf custom font, which you can download for free from http://www.fontsquirrel.com/fonts/download/ChunkFive and save it to app/assets/android/fonts
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 view1 = Titanium.UI.createScrollView({ | |
contentWidth:Ti.UI.FILL, | |
contentHeight:Ti.UI.FILL, | |
showVerticalScrollIndicator:true, | |
showHorizontalScrollIndicator:true | |
}); | |
var label1 = Titanium.UI.createLabel({ | |
color:'#000', | |
text: "sdfsdfasdf ", |
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
/* | |
Android: | |
PORTRAIT 1 | |
LANDSCAPE 2 | |
iOS: | |
PORTRAIT 1 | |
UPSIDE_PORTRAIT 2 (iOS-only) | |
LANDSCAPE_LEFT 3 | |
LANDSCAPE_RIGHT 4 |
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
// | |
// blog.clearlyionnovative.com | |
// twitter: @aaronksaunders | |
// | |
// Model file for integration Appcelerator Titanium Alloy with Wordpress JSON Plugin | |
// | |
exports.definition = { | |
config : { | |
"columns" : {}, |
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
sound = Ti.Media.createAudioPlayer({ | |
url: 'http://www.televisiontunes.com/themesongs/The%20Gadget%20Show.mp3' | |
}); | |
sound.play(); | |
var tempIntCount = 0; | |
trackTempInterval = setInterval(function() { | |
tempIntCount++; | |
console.log('Current state: ' + sound.state); | |
console.log('Current position:' + sound.time); |
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
//taken from http://developer.appcelerator.com/question/117491/removing-children-from-a-view | |
function removeAllChildren(viewObject){ | |
//copy array of child object references because view's "children" property is live collection of child object references | |
var children = viewObject.children.slice(0); | |
for (var i = 0; i < children.length; ++i) { | |
viewObject.remove(children[i]); | |
} | |
} |
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
1. On the computer with the developer credentials, Goto Xcode->Preferences->Accounts. | |
Click on the gears to export the profile. Choose a password as it includes all your credentials of apple-developer program. | |
2. Share the exported file with the new computer. | |
3. Import the profile in your Xcode->preferences->Accounts. |
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 w=Ti.UI.createWindow({ | |
backgroundColor: "#fff" | |
}); | |
var s=Ti.UI.createScrollView({ | |
height: Ti.UI.FILL, | |
width: Ti.UI.FILL | |
}) | |
var t=Ti.UI.createLabel({ |
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 w=Ti.UI.createWindow({ | |
backgroundColor: '#fff' | |
}) | |
var URL='https://posttestserver.com/post.php'; | |
var xhr = Titanium.Network.createHTTPClient(); | |
xhr.tlsVersion = Titanium.Network.TLS_VERSION_1_1; | |
xhr.onload = function() { | |
//var jsonObject = JSON.parse(this.responseText); |
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 win = $.index; | |
var acceptAction = Ti.App.iOS.createUserNotificationAction({ | |
identifier: "ACCEPT_IDENTIFIER", | |
title: "Accept", | |
activationMode: Ti.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND, | |
destructive: false, | |
authenticationRequired: true | |
}); |
OlderNewer