覆盖在相机屏幕上方

时间:2012-11-29 11:03:39

标签: titanium titanium-mobile

我试图找到在Titanium应用程序的相机屏幕顶部添加一些叠加层的方法。透过StackOverflow,我发现了这篇文章:

Is Titanium appcelerator worth it for developing camera based application on ipad, iphone and android?

蒂姆罗森布拉特说,这是可行的。我想知道是否有人可以给我一些链接,我可以找到一些文档来做到这一点。

提前致谢

2 个答案:

答案 0 :(得分:3)

var overlay = Ti.UI.createView({ top: 20, right: 20, height: 50, left: 20 });
Ti.Media.showCamera({
    overlay: overlay
});

您可以在此处看到可以传递给showCamera的其他参数:

http://docs.appcelerator.com/titanium/2.1/index.html#!/api/CameraOptionsType

你可能想要“showControls:false”,加上“success:function(){...}”,错误和取消。

答案 1 :(得分:0)

这是api文档的链接,您可以在其中找到您可以在应用中找到的所有属性(UI /网络/电话属性) http://docs.appcelerator.com/titanium/2.1/index.html#!/api

这第二个链接指的是厨房水槽应用程序。它演示了Titanium DOC中的所有组件以供参考。它是免费的,你可以下载并安装它,看看代码 https://github.com/appcelerator/KitchenSink

希望有所帮助

相关问题