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 TestView() { | |
var self = Ti.UI.createWindow({ | |
backgroundColor:'white', | |
title: 'Test' | |
}); | |
var cards = []; | |
for( var i=0; i<=10; 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
// ALPHABYTES | |
// Facebook like menu window | |
var leftMenu = Ti.UI.createWindow({ | |
backgroundColor: 'red', | |
top: 0, | |
left: 0, | |
width: 150, | |
zIndex: 1 | |
}); |
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 = Titanium.UI.createWindow({ | |
title:'Audio Test', | |
backgroundColor:'#fff', | |
layout: 'vertical' | |
}); | |
var startStopButton = Titanium.UI.createButton({ | |
title:'Start/Stop Streaming', | |
top:'10dp', | |
width:'200dp', |
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
/* locate this file under: | |
* - Resources/android/ | |
* or | |
* - app/assets/android/ (when working with Alloy) | |
*/ | |
var service = Ti.Android.currentService; | |
var serviceIntent = service.getIntent(); | |
setNotification(); |
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
toasty.show({ | |
title: 'Confirm', | |
message: 'This is a confirmation.', | |
type: 'confirm' | |
}); |
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 loading = require('loading'); | |
loading.start(); | |
setTimeout( function(){ loading.stop(); }, 2000 ); |
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
/** | |
* Calculates the physical display size for android devices | |
* e.g 4,95 for Nexus 5 or 7,02 for Nexus 7 | |
* | |
* IMPORTANT: this requires https://github.com/dbankier/HasMenu | |
* | |
* @return {Number} size as inches | |
*/ | |
function getPhysicalSize(){ | |
// some infos we need |
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
// Forked from https://gist.github.com/2417902 to fix a small bug | |
// ----- | |
function PagingControl(scrollableView){ | |
var pages = []; | |
var page; | |
var numberOfPages = scrollableView.getViews().length; | |
// Configuration | |
var pageColor = "#c99ed5"; | |
var container = Titanium.UI.createView({ |
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 location = require('location'); | |
if (location.enabled){ | |
if (location.hasAuth){ | |
location.currentLocation(function(e){ | |
alert(e.latitude + '; ' + e.longitude); | |
}); | |
}else{ | |
alert('need permission to access location service'); | |
} |
OlderNewer