本文使用的phonegap版本为2.9.0,sencha touch为2.4.0,phonegap jar包可以去官网下载。以android toast作为例子:首先在st项目中建一个viewExt.define('HelloWorld.view.Main', { extend: 'Ext.f... Read More
posted @ 2014-11-15 23:01 小曹ydj Views(1005) Comments(0) Diggs(0)
举例:Ext.define('Cao.view.EventMosaic', { extend: 'Ext.Container', xtype: 'EventMosaic', requires: [ ], config: { cls : 'gallery', ... Read More
posted @ 2014-11-15 11:00 小曹ydj Views(451) Comments(0) Diggs(0)
例如:config:{ name:'小明'}写入config中的属性在实例化的时候会自动生成4个方法:1.get方法,用来获取属性当前的值,例如属性为name,则通过对象实例.getName()来获取该属性的值。2.set方法,这个方法跟get相反,是用来给属性赋值的,我们可以通过对象实例.set... Read More
posted @ 2014-11-15 10:39 小曹ydj Views(331) Comments(0) Diggs(0)
1,打开cmd,路径定位到sencha touch项目。2,执行sencha cmd的打包指令 sencha app build testing:这个指令是用来打包测试的,这个指令会将所有的js文件压缩到app.js中去,但是并不做压缩处理,用来让开发者在执行代码压缩前调试代码用的,指令执行后,会在... Read More
posted @ 2014-11-15 10:29 小曹ydj Views(312) Comments(0) Diggs(0)
attachListener: function(eventName, doc) { if (!doc) { doc = document; } var defaultView = doc.defaultView; if ... Read More
posted @ 2014-11-15 10:19 小曹ydj Views(216) Comments(0) Diggs(0)
点击开始==》运行==》cmd,找到sdk路径输入sencha cmd创建项目指令:sencha generate app HelloWorld ../helloworld generate app==创建一个新的项目, 第一个参数HelloWorld==对应的是项目的名称, 第二... Read More
posted @ 2014-11-15 10:16 小曹ydj Views(152) Comments(0) Diggs(0)
修改touch/src/fx/runner/CssTransition.js中的源码:onTransitionEnd: function(e) {vartarget = e.target,id = target.id,propertyName = e.browserEvent.propertyNam... Read More
posted @ 2014-11-15 10:00 小曹ydj Views(199) Comments(0) Diggs(0)
举例:{ xtype : 'img', height : '100%', width : '100%' style:'background-image:url(resources/icons/Icon.png);background-size:cover'} Read More
posted @ 2014-11-15 09:49 小曹ydj Views(643) Comments(0) Diggs(0)
举例://json数据var regdata = { Event : 'event', RegForm : [] };//添加数据regdata.RegForm.push({Key: yourKey, Value: yourValue});//传json数据到后台Ext.data.Json... Read More
posted @ 2014-11-15 09:35 小曹ydj Views(238) Comments(0) Diggs(0)
举例加入点击事件:view中有一个container:{ xtype:'container', id:'myContainer', html:'aaaaaaaa'+ 'bbbbbbb' }加入监听方法://this==myContainer... Read More
posted @ 2014-11-15 09:25 小曹ydj Views(710) Comments(0) Diggs(0)
举例:xtype:'list', store:'eventsListStore', itemTpl: new Ext.XTemplate('', '', '', '', '{[this.decode(values.Title)]}', /... Read More
posted @ 2014-11-15 09:12 小曹ydj Views(1396) Comments(0) Diggs(0)
找了一个老外重写的可滑动的 textarea:Ext.define('LeslieTest.view.TextArea',{ extend : 'Ext.field.TextArea', xtype : 'scrollTextArea', initialize : func... Read More
posted @ 2014-11-15 08:59 小曹ydj Views(2099) Comments(0) Diggs(0)
解决方法:将源码的Carousel.js的onDrag方法中的 if ((currentActiveIndex === 0 && delta > 0) || (currentActiveIndex === maxIndex && delta 0) || (currentActiveIndex ==... Read More
posted @ 2014-11-15 08:51 小曹ydj Views(370) Comments(0) Diggs(0)
开发过程中涉及到跨域问题解决方法:找到谷歌浏览器,加入以下命令。--disable-web-security Read More
posted @ 2014-11-15 08:40 小曹ydj Views(126) Comments(0) Diggs(0)