Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8257] Android: "Horizontal" (and possibly other) layout behavior is incorrect in Rhino

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-03-28T15:39:07.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterStephen Tramer
AssigneeNeeraj Gupta
Created2012-03-23T15:48:13.000+0000
Updated2012-03-30T14:06:12.000+0000

Description

In the RHINO runtime, views with a "horizontal" layout are not rendered correctly; v8 renders them differently. This ticket has two images attached to it (one with V8 behavior, one with RHINO behavior) where the V8 behavior appears correct, and matches with the behavior of iOS. Code to test:
var win1 = Ti.UI.createWindow({  
    title:'Win 1',
    layout:'vertical',
    backgroundColor:'#fff'
});

var vw1 = Ti.UI.createView({
    layout:'horizontal',
    backgroundColor:'red',
    width:'100%',
    height:75
});
win1.add(vw1);

//
var TheOrange=Ti.UI.createView({height:75,
                                width:'160dp',
                                backgroundColor:'orange',
                                top:0
                               });

var GreenView=Ti.UI.createView({
          height:Ti.UI.SIZE,
          width:Ti.UI.SIZE,
          focusable:false,
          touchEnabled:false,
          backgroundColor:'green'
});

GreenView.add(TheOrange);
vw1.add(GreenView);

var BlueView=Ti.UI.createView({
    backgroundColor:'blue',
    width:50,
    height:50
});
vw1.add(BlueView);
//

win1.open();

Attachments

FileDateSize
Screen Shot 2012-03-23 at 4.29.38 PM.png2012-03-23T15:48:13.000+000082364
Screen Shot 2012-03-23 at 4.47.53 PM.png2012-03-23T15:48:13.000+000082202

Comments

  1. Opie Cyrus 2012-03-28

    Tested on 2.2 device (Droid 2) and 2.2 emulator. Unable to reproduce against 2_0_X branch: 957cb5502d87079c048f57c9a3d4f87e82641d56
  2. Satyam Sekhri 2012-03-30

    Closing the issue. Studio: 2.0.0.201203291340 SDK: 2.0.0.v20120329191102 Device: Android Emulator 2.2, Motorola droid (V2.2.3) OS: Mac OS X 10.6.8 Cannot reproduce the issue

JSON Source