Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10381] BlackBerry: zIndex bug for View

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-07-09T22:37:28.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 14, 2013 Sprint 14 API
ComponentsBlackBerry
Labelsn/a
ReporterHayk Zakaryan
AssigneePedro Enrique
Created2012-08-10T03:57:55.000+0000
Updated2014-06-19T12:43:20.000+0000

Description

If create a View, inside it 3 other views and position them by ZIndex, add the view to the window Z index is not correctly behaving. For test open KS->Base Ui->Views->ZIndex (file Resources\ui\common\baseui\view_zIndex.js) views 1-3 are not positioned by zIndex correctly. Adding views directly to window work correct.

Comments

  1. Hayk Zakaryan 2012-08-15

    getZIndex() returns actual values, but on the screen they are not ordered as higher zIndex on the top.
  2. Pedro Enrique 2013-07-09

    Cannot reproduce. Test code:
       var win = Ti.UI.createWindow({
       	backgroundColor: '#ccc'
       });
       
       var zIndex = 1;
       
       var v1 = Ti.UI.createView({
       	top: 10,
       	left: 10,
       	width: 100,
       	height: 100,
       	backgroundColor: 'green'
       });
       
       win.add(v1);
       
       var v2 = Ti.UI.createImageView({
       	top: 40,
       	left: 40,
       	width: 100,
       	height: 100,
       	backgroundColor: 'red'
       });
       
       win.add(v2);
       
       var v3 = Ti.UI.createView({
       	top: 60,
       	left: 60,
       	width: 100,
       	height: 100,
       	backgroundColor: 'yellow'
       });
       
       win.add(v3);
       
       v1.addEventListener('click', function(){
       	zIndex++;
       	v1.zIndex = zIndex;
       });
       
       v2.addEventListener('click', function(){
       	zIndex++;
       	v2.zIndex = zIndex;
       });
       
       v3.addEventListener('click', function(){
       	zIndex++;
       	v3.zIndex = zIndex;
       });
       
       win.open();
       
  3. Lokesh Choudhary 2013-08-12

    Verified the fix by the code provided by pedro & it is working as expected. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130809141556 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88 Q10 Simulator : 10.1.0.1720 Q10 Dev alpha C device running 10.1.0.138

JSON Source