将 DataView 和 ListView 放在同一个面板上
我在使用 sencha touch 开发应用程序时设计用户界面时遇到问题,首先,我熟悉 iPhone 界面生成器,只需拖放对象即可轻松将我需要的任何内容放置在屏幕上,但现在我必须处理仅用于设计界面的硬编码,特别是我的问题是将获得 XTemplate 的数据视图分别放在列表视图上,这样当我想向下滚动它时,我可以看到列表视图,但使用我的代码,我向下滚动数据视图并没有看到列表视图,因为他们的行为就像他们本来的样子它们彼此分开,都有自己的滚动功能:)如果我使用浏览器打开应用程序,该应用程序有足够的空间来显示所有内容。我可以看到列表视图和数据视图,所以任何想法都可能非常有帮助,因为它是时间限制的项目,我已经浪费了很多时间专注于它..你可以在下面看到我的代码,谢谢
this.listpanel = new Ext.Panel({
layout:'fit',
items: [symbolView,newsBySymbolList],
dockedItems: [{
xtype: 'toolbar',
title: this.record.data.c,
items: [{
ui: 'back',
text: 'Back',
scope: this,
handler: function(){
this.ownerCt.setActiveItem(this.prevCard, {
type: 'slide',
reverse: true,
scope: this,
after: function(){
this.destroy();
}
});
}
}
]
}],
listeners: {
activate: { fn: function(){
newsBySymbolList.getSelectionModel().deselectAll();
Ext.repaint();
}, scope: this }
}
});
I am having a problem with designing user interface for developing app by using sencha touch, first off, I am familiar with iPhone interface builder which was easy to place whatever I need on the screen by just dragging and dropping objects but now I have to deal with hard coding just for designing interface specifically my problem is to put data view which got XTemplate, over the list view separately so that when I want to scroll it down I can see the list view but with my code I scroll the data view down and not seeing list view cuz they acting like they are separate from each other they both have their own scrolling feature :) if I open the app with browser which has enough space to show everything.. I can the either see the list view and the data view so any ideas could be very helpful cuz it is time restrictive project and I already waste a lot of time focusing on it.. you can see my code below Thx
this.listpanel = new Ext.Panel({
layout:'fit',
items: [symbolView,newsBySymbolList],
dockedItems: [{
xtype: 'toolbar',
title: this.record.data.c,
items: [{
ui: 'back',
text: 'Back',
scope: this,
handler: function(){
this.ownerCt.setActiveItem(this.prevCard, {
type: 'slide',
reverse: true,
scope: this,
after: function(){
this.destroy();
}
});
}
}
]
}],
listeners: {
activate: { fn: function(){
newsBySymbolList.getSelectionModel().deselectAll();
Ext.repaint();
}, scope: this }
}
});
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不能使用布局:适合。您需要在包含面板上使用以下内容,
然后为每个子视图集使用:
应该可以。
You can not use layout:fit. You need to use following on containing panel
then for each subview set:
That should do it.