0
工作,我有這樣的代碼:鈦Appcelerator的搜索不與搜索欄
var search = Titanium.UI.createSearchBar();
var myTemplate = {
properties: {
accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE,
},
childTemplates: [
{
type: 'Ti.UI.Label',
bindId: 'destinazione',
properties: {
left: '24%'
}
},
]
};
var listView = Ti.UI.createListView({
templates: { 'template': myTemplate },
defaultItemTemplate: 'template',
searchView: search
});
恢復數據後與onload事件
xhrPart.onload = function() {
partenzeJSON = JSON.parse(this.responseText);
for (i in partenzeJSON){
var flightSection = Ti.UI.createListSection();
var flightDataSet = [];
flightDataSet = [{
destinazione: {text: partenzeJSON[i].destinazione, searchableText: partenzeJSON[i].destinazione},
}];
flightSection.setItems(flightDataSet);
sections.push(flightSection);
}
listViewPartenze.setSections(sections);
};
進入,因爲研究不工作? 不尋找列表視圖中的數據輸入
謝謝!!!