Hey guys,
I'm really hoping this is a simple question and I'm just missing something having to do with touchEnabled, etc. but I can't figure it out.
I have an Android camera phone (the Samsung Skyrocket) and unfortunately it does not autofocus until I fire takePicture(), which is ok, IF they can touch the screen and have it focus manually :) It does not.
Does anyone know how to make it so Android phones can mimic the native functionality that allows it to manually focus when the screen is touched?
Example (not working):
var win = Ti.UI.createWindow({ backgroundColor: "#00ff00" }); var camera_overlay = Ti.UI.createView({ top: 0, height: Ti.Platform.height, width: Ti.Platform.width, opacity: 0.2, backgroundColor: "#ff0000", touchEnabled: false }); win.addEventListener("open", function(){ Ti.Media.showCamera({ success: function(e){ Ti.API.info("success"); }, cancel:function() { Ti.API.info("error"); }, error:function(error) { Ti.API.info("error: "+JSON.stringify(error)); }, autohide:false, showControls:false, overlay: camera_overlay }); }); win.open();One thing to note here is that if I use this code it DOES show the controls and also DOES let me click the screen to focus...:
var win = Ti.UI.createWindow({ backgroundColor: "#00ff00" }); win.addEventListener("open", function(){ Ti.Media.showCamera({ success: function(e){ Ti.API.info("success"); }, cancel:function() { Ti.API.info("error"); }, error:function(error) { Ti.API.info("error: "+JSON.stringify(error)); }, autohide:false, showControls:true }); }); win.open();I'm currently using:
Android (the Samsung Skyrocket) Titanium 3.3.0