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

Android: Nested layout issue with Android

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Invalid
    • Affects Version/s: Release 3.2.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      3.2 SDK, Android

      Description

      When a vertical layout is nested within a horizontal layout on an android device. The views don't work properly. The height of the vertical view is added to the horizontal view, and the vertical view is not centered in the horizontal view as it should be (with no top property set) works correctly in iphone, see the iphone result for what i expect should be occurring.

      Notice on android the blue extending past the image (the added height, seemingly equal to the height of the red) and the vertical layout view docked to the top of the horizontal view, should be centered

      With dynamic data coming in, i'm not sure of a workaround.

      Alloy:

      xml:

      <Alloy>
          <Window class="container">
      		<View class="horizontal">
      			<ImageView></ImageView>
      			
      			<View class="vertical">
      				<Label id="label1"></Label>
      				<Label id="label2"></Label>
      			</View>
      		</View>
          </Window>
      </Alloy>
      

      tss:

      "ImageView":{
      	image: "/appicon.png",
      	height: 64,
      	width: 64
      }
       
      ".horizontal": {
      	layout: "horizontal",
      	width: Ti.UI.FILL,
      	height: Ti.UI.SIZE,
      	backgroundColor: "blue"
      }
       
       
      ".vertical": {
      	layout: "vertical",
      	width: Ti.UI.FILL,
      	height: Ti.UI.SIZE,
      	backgroundColor: "red"
      }
       
      "Label":{
      	width: Ti.UI.SIZE,
      	height: Ti.UI.SIZE,
      }
       
      "#label1": {
      	text: "Label 1 text",
      	color: "black"
      }
       
      "#label2": {
      	text: "Label 2 text",
      	color: "black"
      }
      

        Attachments

          Activity

            People

            • Assignee:
              emerriman Eric Merriman
              Reporter:
              paul h Paul Hamilton
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration