Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23531] Windows: Tab title color is not changed on selection

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-06-28T12:18:55.000+0000
Affected Version/sRelease 5.4.0
Fix Version/sRelease 6.0.0
ComponentsWindows
Labelsqe-5.4.0
ReporterHarry Bryant
AssigneeKota Iguchi
Created2016-06-15T22:29:05.000+0000
Updated2016-09-06T13:53:42.000+0000

Description

The currently viewed tab in an app will have the tab title highlighted, when switching the tabs, the current viewed tab highlight does not change appropriately.

TEST CODE


// create tab group
var tabGroup = Titanium.UI.createTabGroup();
 
//
// create base UI tab and root window
//
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);
 
//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({
    title: 'Tab 2',
    backgroundColor: '#fff'
});
var tab2 = Titanium.UI.createTab({
    icon: 'KS_nav_ui.png',
    title: 'Tab 2',
    window: win2
});
 
var label2 = Titanium.UI.createLabel({
    color: '#999',
    text: 'I am Window 2',
    font: { fontSize: 20, fontFamily: 'Helvetica Neue' },
    textAlign: 'center',
    width: 'auto'
});
 
win2.add(label2);
 
//
//  add tabs
//
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
 
// open tab group
tabGroup.open();

Steps to Reproduce

1. Create a new classic mobile project. 2. Apply Test Code to app.js file. 3. Launch App. 4. Click on tab 1, then click tab 2.

Expected Result

Currently Viewed tab should have the title highlighted.

Actual Result

Tab 1 is constantly highlighted despite the selected tab.

Comments

  1. Kota Iguchi 2016-06-17

    Confirmed that this is not happening on Windows Phone 8.1 even we use same native component (Windows::UI::Xaml::Controls::PivotItem). I will check to see if this is native behavior or not.
  2. Kota Iguchi 2016-06-20

    ok confirmed that the Pivot component itself works fine on native app. ([Pivot sample](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlPivot)) so root cause should be somewhere in Titanium. Started working on it.
  3. Kota Iguchi 2016-06-20

    https://github.com/appcelerator/titanium_mobile_windows/pull/747
  4. Ewan Harris 2016-09-06

    Verified using: OS: Microsoft Windows 10 Pro 10.0.14393 Appc core: 6.0.0-38 Appc NPM: 4.2.8-6 Ti SDK: 6.0.0.v20160904203840 Lumia 930: 10.0 Lumia 520: 8.1 Tab title color is now changed on selection, defaulting to white for active and grey for inactive or the colors specified using activeTitleColor or titleColor Closing ticket

JSON Source