Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19536

Android: When Multiple Views in horizontal layout, "SIZE" constrains to the full container size, not the remaining available width

    Details

    • Story Points:
      8
    • Sprint:
      2017 Sprint 17 SDK

      Description

      If you create a View with a horizontal layout and a fixed width, and two children, one of fixed width, and one of "SIZE" width, the second one will expand to, what appears to be, the full size of the container, even though this makes it run out of the containing view (and get cut off). This works as expected in iOS.

      Also, if you set the view to FILL, it doesn't get cut off in that case either.

      Here's an example of code that demonstrates this issue.

      Note, depending on screen size, part of the "Alphabet" label is getting cut off. The amount that gets cut off seems to be dependent on the size of the view I've ID'ed as "Control".

      <Alloy>
      <Window class="container" layout="vertical" >
      <View id="Title" layout="vertical" height="Ti.UI.SIZE"
      width="90%" top="5" bottom="5"><Label height="Ti.UI.SIZE">Test 123</Label></View>

      <View height="Ti.UI.SIZE" width="87%" layout="vertical">
      <View layout="horizontal"
      height="Ti.UI.SIZE" width="Ti.UI.FILL"
      backgroundColor="#400098C3"
      horizontalWrap="false"
      top="2" bottom="2"
      >
      <View id="Control" height="20" width="20"
      top="5" bottom="5"
      left="2" right="2"
      />
      <Label id="Alphabet" height="Ti.UI.SIZE" width="Ti.UI.SIZE">abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz</Label>
      </View>
      </View>
      </Window>
      </Alloy>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                timkellypa Tim Kelly
                Tester:
                Abir Mukherjee
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20364
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code