简体   繁体   English

Titanium iOS应用程序转换为Android

[英]Titanium iOS app to Android

I built an iOS app for a company i know, now I'm trying to make that same app for android. 我为一家我认识的公司构建了一个iOS应用,现在我正尝试为Android开发相同的应用。 Just clicking the "Android" button in the xml file doesn't work. 仅单击xml文件中的“ Android”按钮不起作用。 Do I have to rewrite the whole app again or is there some other way I can easily make that same app for android? 我是否需要重新重写整个应用程序,还是可以通过其他方法轻松地将同一应用程序用于android?

No, You don't need to rewrite the whole code again. 不,您不需要再次重写整个代码。 But you should have to make some platform specific codes. 但是您必须编写一些平台特定的代码。 Also some controls like Toolbar will not be available for Android. 此外,某些ToolbarToolbar将不适用于Android。 You can check the platform using Ti.Platform.osname or getOsname() method, which will return the osname(android/ios). 您可以使用Ti.Platform.osnamegetOsname()方法检查平台,这将返回osname(android / ios)。 In short, all other code will be work in android platform also. 简而言之,所有其他代码也将在android平台上运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM