Layout 卡片布局-活动项目-sencha touch
我有一个视图是在卡片布局。 卡有2个子视图 现在,我想获取activeitem。 在extjs中,我使用以下代码:Layout 卡片布局-活动项目-sencha touch,layout,extjs4,sencha-touch,Layout,Extjs4,Sencha Touch,我有一个视图是在卡片布局。 卡有2个子视图 现在,我想获取activeitem。 在extjs中,我使用以下代码: activeItem = layout.getActiveItem().itemId; 但在sencha touch中,对于卡片布局,没有名为getActiveItem()的方法用于卡片布局。 我已经参考了sencha touch文档,我发现了这一点 有人知道这个的替代方案吗 var panel = Ext.create('Ext.Panel', { layout: 'card
activeItem = layout.getActiveItem().itemId;
但在sencha touch中,对于卡片布局,没有名为getActiveItem()的方法用于卡片布局。
我已经参考了sencha touch文档,我发现了这一点
有人知道这个的替代方案吗
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()方法
参考面板布局设置活动项(2);