Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7125] Android: UI - Incorrect left padding for first child using horizontal layout

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2012-06-18T15:23:34.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.1.0
Fix Version/sRelease 2.1.0, Sprint 2012-12 Core
ComponentsAndroid
Labelscore, module_views, qe-testadded
ReporterLuca Borghini
AssigneeAllen Yeung
Created2012-01-11T17:16:52.000+0000
Updated2012-07-11T10:58:08.000+0000

Description

Problem

Incorrect left padding for first child using horizontal layout. See attached screenshot.

Test case

var win = Ti.UI.createWindow({
  title:'Window 1',
  backgroundColor:'#fff'
});
var view = Ti.UI.createView({
  layout: 'horizontal'
});

for(var x=0;x<10;x++){
  var subview = Ti.UI.createButton({
    top: 10,
    left: 10,
    width: 100,
    height: 100,
    title: 'Test'
  });
  view.add(subview);
}

win.add(view);
win.open();

Attachments

FileDateSize
screenshot_467.png2012-01-12T04:26:26.000+000039159

Comments

  1. Ivan Skugor 2012-01-12

    Hi Luca. You missed to mention couple of things, check this: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template I can confirm strange behavior. Also, "navbar" covers part of top buttons. Paul, I don't know is layout behavior explained in layout specification because it's not available to all users in Wiki. Could that be changed? Thanks.
  2. Paul Dowsett 2012-01-12

    Luca Have you tested this on iOS? Is there the same behavior? Thanks
  3. Paul Dowsett 2012-01-12

    Thanks for pointing Luca to those guides, Ivan - hopefully Luca will read them before opening another ticket. ;) Which layout specification do you mean? Have you seen one specifically, or are you suggesting there ought to be one? If you know of one that exists, please would you provide a link? Many thanks
  4. Ivan Skugor 2012-01-12

    http://wiki.appcelerator.org/display/spe/UI+Layout+API+Spec I can't see what content it contains, but it would be nice to have layout specification so users can know what to expect when they combine different layout properties.
  5. Luca Borghini 2012-01-12

    Hi, thanks for pointing me to the jira guide! next time i will follow it! Paul, just a note, the error is starting from second row. The first row seems correct. I tested it on IPAD and IPAD simulator and the behavior is not present.
  6. Max Stepanov 2012-06-17

    Allen, I believe you may have addressed this already in PR 2368.
  7. Max Stepanov 2012-06-18

    Verified to be fixed by PR https://github.com/appcelerator/titanium_mobile/pull/2368
  8. Olga Romero 2012-06-26

    Verified fix with Titanium Studio, build: 2.1.0.201206251749 Titanium SDK: 2.1.0.v20120626104306 Device: LG VS910 4G/ 2.3.6

JSON Source