Allright, I m test the Sencha Touch framework Packed in Telephonegap and prepared to a HTC Hopee with 2.2. 申请的目的只是要熟悉《框架》,并且(以)能力。
I m 采用MVC模式。 该申请包括使用代理人从json档案中装入数据储存的物品清单。 其中一个项目被点击时,显示一个详细页。
app.views.viewport.setActiveItem(app.views.placesList, options.animation);
但是,在过渡之前,有一些滞后之处,一个白色屏幕显示时间很小。 我已表明这一点:
The code below shows the structure and functionality of my application:
<><><>>>>
app.models.Place = Ext.regModel("app.models.Place", {
fields: [
{name: "name", type: "string"},
{name: "location", type: "string"}
]
});
app.stores.places = new Ext.data.Store({
model: "app.models.Place",
proxy: {
type: ajax ,
url : js/app/data/products.json ,
reader: {
type: json ,
root: products
}
}
});
View
app.views.PlacesList = Ext.extend(Ext.Panel, {
fullscreen: true,
scroll: vertical ,
dockedItems: [{
xtype: toolbar ,
title: PlacesList
}],
items: [{
xtype: list ,
store: app.stores.places,
itemTpl: {name} ,
onItemDisclosure: function () {
Ext.dispatch({
controller: app.controllers.places,
action: show
});
}
}],
initComponent: function() {
app.stores.places.load();
app.views.PlacesList.superclass.initComponent.apply(this, arguments);
}
});
<><><><><>><>>>><>>>>>>
app.controllers.places = new Ext.Controller({
show: function(options) {
app.views.viewport.setActiveItem(app.views.placeDetail, options.animation);
},
back: function(options) {
app.views.viewport.setActiveItem(app.views.placesList, options.animation);
}
});
我很想知道,经验丰富的滞后是否只是Sencha Touch的,还是来自该守则。
提前感谢,
Gerard