widgets/switchfield/views/widget.xml
<Alloy>
<TableViewRow id="container">
<Label id="label"/>
<Switch id="switchControl" onChange="change"/>
</TableViewRow>
</Alloy>
var toolbar = Ti.UI.iOS.createToolbar({ | |
bottom: 0, | |
left: 0, | |
right: 0, | |
width: Ti.UI.FILL, | |
barColor: 'transparent', | |
translucent: true, | |
backgroundGradient: { | |
type: 'linear', | |
colors: [ |
widgets/switchfield/views/widget.xml
<Alloy>
<TableViewRow id="container">
<Label id="label"/>
<Switch id="switchControl" onChange="change"/>
</TableViewRow>
</Alloy>
var webgl = require('appersonlabs.webgl'); | |
var win = Ti.UI.createWindow({ | |
backgroundColor:'#ccc' | |
}); | |
var canvas = webgl.createCanvasView({ | |
height: Ti.Platform.displayCaps.platformHeight, | |
width: Ti.Platform.displayCaps.platformWidth, | |
backgroundColor: 'white' |
var styles = require('styles'); | |
// creates { color: 'blue', font: { fontSize: 16 }, textAlign: 'right' } | |
var usernameLabel = Ti.UI.createLabel(_.defaults({ | |
textAlign: 'right' | |
}, styles.style_classes.Label, styles.style_ids.username_label)); |
var args = arguments[0] || {}; | |
var event = args.event; | |
var parent = args.parent; | |
$.addEventListener('swipe', function(e) { | |
parent.swipe(e); | |
} |
".container": { | |
backgroundColor:"white" | |
}, | |
"#header": { | |
top: 0, | |
height: 40, | |
backgroundColor: 'yellow' | |
}, |
function curlDown(e) { | |
$.back.close({ transition: Ti.UI.iPhone.AnimationStyle.CURL_DOWN }); | |
} |
16:12:24.722| Logging mode 2 enabled in domains: {CBL_Router, CBL_URLProtocol, CBLReplication, ChangeTracker, Sync, SyncVerbose} | |
16:12:24.725| Sync: ReplicatorManager scanning existing _replicator docs... | |
16:12:24.751| Sync: ReplicatorManager done scanning. | |
16:12:29.849| Sync: CBL_Puller[http://lite.couchbase./source/] STARTING ... | |
16:12:29.849| CBLBasicAuthorizer initWith <http://lite.couchbase./source/> | |
16:12:29.954| Sync: CBL_Puller[http://lite.couchbase./source/]: Going online | |
16:12:29.954| Sync: CBL_Puller[http://lite.couchbase./source/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1) | |
16:12:29.954| SyncVerbose: CBL_Puller[http://lite.couchbase./source/]: GET _local/235aa4ef8704428da3bcd63596f7efc7269d840f | |
16:12:29.957| Sync: CBL_Puller[http://lite.couchbase./source/]: postProgressChanged (0/0, active=1 (batch=0, net=1), online=1) | |
16:12:29.957| CBLReplication: CBLReplication[from http://lite.couchbase./source/]: mode=3, completed=0, total=0 (changed=1) |
public void doSomething() { | |
} | |
@Kroll.method | |
public void foogle(KrollFunction callback) { | |
final MyProxy self = this; | |
callback.call(this.getKrollObject(), new Object[] { | |
new KrollFunction() { | |
public Object call(KrollObject krollObject, Object[] args) { | |
self.doSomething(); |
function(doc) { | |
for (var i in doc) { | |
if (i[0] != '_' && doc.hasOwnProperty(i)) { | |
emit(parseInt(i), null); | |
} | |
} | |
} |