Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19062] Windows: CommandBar does not work with TabGroup

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2015-06-30T17:03:51.000+0000
Affected Version/sRelease 4.1.0
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterKota Iguchi
AssigneeKota Iguchi
Created2015-06-23T08:18:13.000+0000
Updated2015-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();

Comments

  1. Christopher Williams 2015-06-23

    Bumping out to 4.1.1 as it's lower priority.
  2. Kota Iguchi 2015-06-30

    https://github.com/appcelerator/titanium_mobile_windows/pull/334
  3. Lokesh Choudhary 2015-07-01

    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

JSON Source