[TIMOB-19062] Windows: CommandBar does not work with TabGroup
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-06-30T17:03:51.000+0000 |
Affected Version/s | Release 4.1.0 |
Fix Version/s | Release 4.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2015-06-23T08:18:13.000+0000 |
Updated | 2015-07-01T22:41:10.000+0000 |
Description
Unable to attach
Ti.UI.Windows.CommandBar
onto Window
on TabGroup
.
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title: 'Tab 1',
backgroundColor: '#fff'
});
var tab1 = Titanium.UI.createTab({
icon: 'KS_nav_views.png',
title: 'Tab 1',
window: win1
});
var label1 = Titanium.UI.createLabel({
color: '#999',
text: 'I am Window 1',
font: { fontSize: 20, fontFamily: 'Helvetica Neue' },
textAlign: 'center',
width: 'auto'
});
win1.add(label1);
var platform = Ti.Platform.osname;
if (platform === 'windowsphone' || platform === 'windowsstore') {
// Windows command bar
var commandBar = Ti.UI.Windows.createCommandBar();
var addButton = Ti.UI.Windows.createAppBarButton({ icon: Ti.UI.Windows.SystemIcon.ADD, touchEnabled: true });
addButton.addEventListener('click', function () {
alert('clicked');
});
commandBar.items = [addButton];
win1.add(commandBar);
}
tabGroup.addTab(tab1);
tabGroup.open();
Bumping out to 4.1.1 as it's lower priority.
https://github.com/appcelerator/titanium_mobile_windows/pull/334
Verified the fix. Commandbar now works with tabgroup. Closing. Environment: Appc Studio: 4.1.0.201506261427 Ti SDK: 4.1.0.v20150701131146 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-4 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1