Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2786] Android: Cannot change Title of Tab bar

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2014-01-07T05:13:27.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterJudy
AssigneeIngo Muschenetz
Created2011-04-15T03:29:35.000+0000
Updated2017-03-31T17:13:06.000+0000

Description

Changing the title of the currentTab does not work in iOS or Android. Here is simple example code.

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 button1 = Ti.UI.createButton({

title: 'Change button 1',
left: 10,
top: 100,
width: 200,
height: 50

});

button1.addEventListener('click', function(e){

Ti.UI.currentTab.title = 'New Title 2';

});

win1.add(button1);
tabGroup.addTab(tab1);

tabGroup.open();

Comments

  1. hal 2011-04-15

    Judy

    There is not enough information here. Please read http://developer.appcelerator.com/guides/en/contribute.html#submitting_bugs"> Submitting Bugs and supply the omitted information, otherwise it may be marked invalid.

  2. hal 2011-04-15

    Please also edit your ticket and use the markdown syntax provided, so it displays correctly.

    Thanks

  3. hal 2011-04-15

    I suspect this is a duplication of https://appcelerator.lighthouseapp.com/projects/32238-titanium-mobile/tickets/2361"> #2361, which is another reason why the correct procedure (particularly discussing the issue with the community first) should be followed before raising a ticket

  4. Stephen Tramer 2011-04-15

    Probably related to other tab issues.

  5. Junaid Younus 2012-08-28

    Tested on a Samsung Galaxy S2 and iOS simulator using TiSDK 2.2.0v20120824175712, issue still valid.
       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 button1 = Ti.UI.createButton({
           title : 'Change button 1',
           left : 10,
           top : 100,
           width : 200,
           height : 50
       });
       
       button1.addEventListener('click', function(e)
       {
           tab1.title = 'New Title 2';
       });
       
       win1.add(button1);
       tabGroup.addTab(tab1);
       
       tabGroup.open();
       
  6. Biju pm 2014-01-07

    The issue cannot reproduce with the release master 3.2.0 Tested with: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK version: 3.2.0 Tested on Device: Samsung galaxy s duos Android version: 4.0.4
  7. Lee Morris 2017-03-31

    Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source