Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25624] Androd: "tabDividerColor" for tab is not working.

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionWon't Fix
Resolution Date2019-06-24T22:55:50.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterAndreas Pingas
AssigneeYordan Banev
Created2017-12-19T10:43:43.000+0000
Updated2019-06-24T22:55:50.000+0000

Description

Is there a way to change colour in TabGroup? (color of the divider between tabs) The following appears on the documentation: tabDividerColor : String Color of the divider between tabs, as a color name or hex triplet.For information about color values, see the "Colors" section of Titanium.UI. The above way doesn't work. Is there another solution? Thank you in advance.

Attachments

FileDateSize
68747470733a2f2f692e696d6775722e636f6d2f516566746476552e706e67.png2017-12-19T10:38:37.000+000014106

Comments

  1. Sharif AbuDarda 2017-12-21

    Hello, I can verify the issue on Android with the below code.
       var win1 = Ti.UI.createWindow({
           backgroundColor: 'blue',
           title: 'Blue'
       });
       win1.add(Ti.UI.createLabel({text: 'I am a blue window.'}));
       
       var win2 = Ti.UI.createWindow({
           backgroundColor: 'red',
           title: 'Red'
       });
       win2.add(Ti.UI.createLabel({text: 'I am a red window.'}));
       
       var tab1 = Ti.UI.createTab({
           window: win1,
           title: 'Blue'
       }),
       tab2 = Ti.UI.createTab({
           window: win2,
           title: 'Red'
       }),
       tabGroup = Ti.UI.createTabGroup({
           tabs: [tab1, tab2],
           tabDividerColor: 'red'
       });
       tabGroup.open();
       
    The tab divider color does not change, it remains the default ash color. Thank.
  2. Yordan Banev 2018-10-04

    Can you share where in the documentation this property appears?
  3. Joshua Quick 2019-06-24

    This can be done via theme/style XML file. This is how native Android developers would do it as well. An example on how to set up this XML file can be found in our "kitchensink-v2" sample app here... https://github.com/appcelerator/kitchensink-v2/blob/master/app/platform/android/res/values/custom_theme.xml I believe the "primaryColor" and "accentColor" XML values are what you need to set.
  4. Alan Hutton 2019-06-24

    Closing per dev comments.

JSON Source