摘要:
Titanium Reduxhttps://github.com/dawsontoth/Appcelerator-Titanium-ReduxTiFrameworkhttps://github.com/rblalock/TiFrameworkExtaniumhttp://www.extanium.org/Adamantiumhttp://adamrenklint.com/projects/adamantium-jsjQuery-style语法的一个框架。下载地址:https://github.com/adamrenklint/Adamantium.jsKraniumhttp://kraniu. 阅读全文
摘要:
虽然Titanium里已有实现多语言的API可以非常方便地实现多语言国际化的功能,但其有一定的局限性,即不能在app里随时更换不同的语言,一定要直接更改整个手机里的语言设置才可生效,具体使用可以查看官方教程。 我这里介绍的方法就可以解决直接在app里随时更换语言的问题,实现起来也很简单,原来其实与官方的差不多,也是要通过读取不同的xml语言文件来显示相关语言。OK,废话少说,直接上代码吧: functionL(text){varlangFile=Ti.App.Properties.getString('lang');varfile=Ti.Filesystem.getFile(T 阅读全文
摘要:
比较简单的几种写法,有更好的方法请指点下。谢谢!第一种: 创建test.js文件:varvalue=0;functionsetValue(_value){value=_value;}functiongetValue(){returnvalue;}exports.setValue=setValue;exports.getValue=getValue;在app.js文件中使用:vartest=require('test');test.setValue(1);button1.addEventListener('click',function(e){alert(test 阅读全文