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
exports.setMenuItemEnabled = function(menuItem, isEnabled) { | |
if(OS_ANDROID) { | |
if(Alloy.Globals.isAndroid3Plus && menuItem.actionView) { | |
menuItem.actionView.touchEnabled = isEnabled; | |
} | |
menuItem.setEnabled(isEnabled); | |
} | |
}; |
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
// http://stackoverflow.com/a/17499889/506724 | |
package com.falkolab.drunkmode.platform; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.lang.reflect.Method; | |
import java.util.ArrayList; | |
import org.appcelerator.kroll.KrollProxy; |
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 patches = require('patches'); | |
patches.fix_displayCaps(); |
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 findViews = function(where, props, deep) { | |
var ctl = _.where(where.children, props); | |
if(deep){ | |
return _.reduce(where.children, function(memo, view) { | |
return memo.concat(findViews(view, props, true)); | |
}, ctl); | |
} else { | |
return ctl; | |
} | |
}; |
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 download(fileUrl, apiPath, callback) { | |
var url = require('url'), | |
http = require('http'), | |
p = url.parse(fileUrl), | |
timeout = 10000; | |
var file = fs.createWriteStream(apiPath); | |
var timeout_wrapper = function( req ) { | |
return function() { |
NewerOlder