卡片布局 - 活动项目 - sencha touch
问题描述:
我有一个视图在卡片布局中。 卡有2个子视图。卡片布局 - 活动项目 - sencha touch
现在我想获得activeitem。 在ExtJS的,我用这个代码:
activeItem = layout.getActiveItem().itemId;
但在煎茶触摸,卡片布局,有)的卡片布局命名getActiveItem(没有这样的方法。 我已经提到sencha触摸文档,我发现。
有人知道这个选择吗?
答
var panel = Ext.create('Ext.Panel', {
layout: 'card',
items: [
{
html: "First Item"
},
{
html: "Second Item"
},
{
html: "Third Item"
},
{
html: "Fourth Item"
}
]
});
panel.setActiveItem(1);
它也有getActiveItem()方法来处理。
panel.layout.setActiveItem(2); – zloctb 2014-09-25 17:51:05