[TIMOB-16069] iOS: setToolbar bad window layout if tabBarHidden is set to true
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Reopened |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.0 |
| Fix Version/s | n/a |
| Components | iOS |
| Labels | n/a |
| Reporter | Antonio Vila |
| Assignee | Unknown |
| Created | 2013-09-23T09:36:29.000+0000 |
| Updated | 2018-02-28T20:04:24.000+0000 |
Description
setToolbar on a Window with "tabBarHidden: true" inside a tabGroup don't layout correctly.
Attachments
| File | Date | Size |
|---|---|---|
| Screen Shot 2013-12-22 at 4.27.52 PM.png | 2013-12-23T00:31:44.000+0000 | 48824 |
| Screen Shot 2013-12-22 at 4.28.43 PM.png | 2013-12-23T00:31:44.000+0000 | 70876 |
| TabGroup.png | 2013-09-23T09:36:29.000+0000 | 28075 |
Hi Antonio Vila, Please add runnable test code and test case that we can easily reproduce this issue. Thanks
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 outputExpected result
Back box will not display if tabBarHidden is trueMoving 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.
I get the same problem with 3.2.2 SDK
Please fix this issue.