Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16069] iOS: setToolbar bad window layout if tabBarHidden is set to true

GitHub Issuen/a
TypeBug
Priorityn/a
StatusReopened
ResolutionUnresolved
Affected Version/sRelease 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterAntonio Vila
AssigneeUnknown
Created2013-09-23T09:36:29.000+0000
Updated2018-02-28T20:04:24.000+0000

Description

setToolbar on a Window with "tabBarHidden: true" inside a tabGroup don't layout correctly.

Attachments

FileDateSize
Screen Shot 2013-12-22 at 4.27.52 PM.png2013-12-23T00:31:44.000+000048824
Screen Shot 2013-12-22 at 4.28.43 PM.png2013-12-23T00:31:44.000+000070876
TabGroup.png2013-09-23T09:36:29.000+000028075

Comments

  1. Mostafizur Rahman 2013-09-23

    Hi Antonio Vila, Please add runnable test code and test case that we can easily reproduce this issue. Thanks
  2. Mostafizur Rahman 2013-12-07

    We can reproduce the problem with the test case below and 3.2.0 GA SDK.

    Test Code

       var self = Ti.UI.createTabGroup();
       
       var send = Titanium.UI.createButton({
       	title : 'Send',
       	style : Titanium.UI.iPhone.SystemButtonStyle.DONE,
       });
       
       var camera = Titanium.UI.createButton({
       	systemButton : Titanium.UI.iPhone.SystemButton.CAMERA,
       });
       
       var cancel = Titanium.UI.createButton({
       	systemButton : Titanium.UI.iPhone.SystemButton.CANCEL
       });
       
       flexSpace = Titanium.UI.createButton({
       	systemButton : Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
       });
       
       var win1 = Titanium.UI.createWindow({
       	title : 'Home',
       	barImage : 'images/KS_nav_views.png',
       	backgroundColor : '#fff',
       	tabBarHidden : true ,
       	toolbar : [send, flexSpace, camera, flexSpace, cancel]
       });
       win1.add(Ti.UI.createLabel({
       	text : "  Windows can be loaded from another JavaScript file by specifying the property url, referencing a file relative to your application Resources folder. It's important to note that Titanium will refuse to load JavaScript files from a remote URL. Loading remote JavaScript from a URL and providing it with the full capabilities of the Titanium API would be very dangerous.When your Window is loaded from a separate JavaScript file, the code will be executed in a separate JavaScript context (called a sub-context) than your app.js global context. It will also execute in its own separate thread",
       	textAlign : 'center'
       }));
       
       var tab1 = Ti.UI.createTab({
       	title : L('home'),
       	icon : '/images/KS_nav_ui.png',
       	window : win1
       });
       win1.containingTab = tab1;
       
       self.addTab(tab1);
       var winPhoto = Titanium.UI.createWindow({
       	title : '',
       	barImage : 'images/KS_nav_views.png',
       	backgroundColor : '#fff',
       	tabBarHidden : false
       });
       var tab3 = Titanium.UI.createTab({
       	icon : 'images/KS_nav_views.png',
       	title : 'My Photos',
       	window : winPhoto
       });
       
       self.addTab(tab3);
       
       self.open();
       
       
       

    Step to reproduces

    1. Create a new project 2. Paste test code in app.js 3. Now run on iOS 7 with simulator 7.0 4. See simulator screen in bottom side, a black box will display 5. Now set tabBarHidden is false in win1 object (line 24) 6. Run this on iOS 7 simulator 7. Compare both output

    Expected result

    Back box will not display if tabBarHidden is true
  3. Ritu Agrawal 2013-12-23

    Moving this ticket to engineering as we can reproduce it with 3.2.0 GA SDK. I have attached two screenshots (tabbarhidden set to true and false) for visual comparison.
  4. John Farrelly 2014-03-22

    I get the same problem with 3.2.2 SDK
  5. Motoi Kataoka 2015-04-01

    Please fix this issue.

JSON Source