【发布时间】:2014-11-29 09:22:01
【问题描述】:
我的应用程序中有两个页面。第一页有一个包含三个选项卡的选项卡组。现在单击第二页中的按钮,我需要将控件重定向到第一页中的第一个选项卡 2。我该怎么做。
我的代码如下,
<Alloy>
<TabGroup id="myTabGrp"> //Tabgroup Added
<Tab id="one">
<Window class="container">
<Label>This is the Home View</Label>
</Window>
</Tab>
<Tab id="two">
<Window class="container" id="winTwo">
<Label>This is the second View</Label>
</Window>
</Tab>
<Tab id="three">
<Window class="container">
<Button onClick="saveLang">Proceed</Button>
</Window>
</Tab>
</TabGroup>
</Alloy>
第二页,
<Alloy>
<Window class="container">
<Button onClick="submitFun">submit</Button>
</Window>
</Alloy>
function submitFun()
{
var homeWindow = Alloy.createController('index').getView();
homeWindow.open({transition:Titanium.UI.iPhone.AnimationStyle.FLIP_FROM_LEFT});
}
我不会加载完整的索引页面,因为加载需要很长时间。我只需要在索引页面中加载一个标签。我该怎么做?
【问题讨论】:
标签: titanium titanium-mobile appcelerator titanium-alloy appcelerator-mobile