Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16643] iOS: Ti.UI.SIZE inside a View works differently for Android and iOS for layout="vertical"

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterManuel Conde Vendrell
AssigneeUnknown
Created2014-03-14T18:36:05.000+0000
Updated2018-02-28T20:04:15.000+0000

Description

I have one view inside a scrollview:
<Alloy>
    <Window backgroundColor="white" title="L('info', 'Info')">
        <ScrollableView id="scrollableView" showPagingControl="true" pagingControlColor="#DDD">
            <ScrollView layout="vertical" scrollType="vertical" showVerticalScrollIndicator="true">
                <Label class="title" top="5" text="L('title1', 'What')" />
                <Label class="label" text="L('info1', 'info1')" />
                <View id="special" layout="vertical" height="Ti.UI.SIZE">
                    <Label class="title" top="5" text="L('special1', 'special1')" />
                    <Label class="label" bottom="10" text="L('special2', 'special2')" />
                </View>
                <Label class="title" text="L('title2', 'Who')" />
                <Label class="label" text="L('info2', 'info2')" />
                <Label class="title" text="L('title3', 'How')" />
            </ScrollView>
        </ScrollableView>
    </Window>
</Alloy>
The expected behaviour is that ** will fill only the view, and it's true in Android, but fails on iOS (NOTE: only fails if I put *layout="vertical"*, because I have other layouts with Ti.UI.SIZE and are working well on both, iOS &Android). See the attached images (*Right Android.png* is with value Ti.UI.SIZE). iOS fills all the area, hidding the other values. For now I put a fixed height to solve the problem. Pd.- BTW I'm unable to make the iOS pagingControlColor transparent so I choose to make it grey, any clue will be appreciated.

Attachments

FileDateSize
Error iOS.png2014-03-14T18:36:05.000+000052401
Expected iOS.png2014-03-14T18:36:05.000+0000103272
info.tss2014-03-17T08:31:52.000+00001249
info.xml2014-03-17T08:31:52.000+00007637
Jira.zip2014-03-18T08:34:14.000+00005908565
Right in Android.png2014-03-14T18:36:05.000+000026332
Screen Shot 2014-03-16 at 7.54.21 PM.png2014-03-17T02:56:07.000+000028757

Comments

  1. Ritu Agrawal 2014-03-17

    I don't have your complete test case so I ran it as it is and I see same behavior on both iOS and Android platforms with 3.2.2 release. Please see attached iOS screenshot that shows correct behavior.
  2. Manuel Conde Vendrell 2014-03-17

    Ok, here is the original code, so you can test.
  3. Manuel Conde Vendrell 2014-03-17

    All inside this index.xml:
       <Alloy>
           <TabGroup id="mainTab">
               <Tab id="alerts" title="L('alerts', 'Alerts')">
       		</Tab>
               <Tab id="config" title="L('config', 'Config')">
               </Tab>
               <Tab id="info" title="L('info', 'Info')">
                   <Require src="info" />
               </Tab>
           </TabGroup>
       </Alloy>
       
  4. Ritu Agrawal 2014-03-18

    I am running into the following error with the latest code. It would be helpful if you can attach a test project that can be run as it is. [INFO] : [index.xml] view processing... [INFO] : view: "index.xml" [ERROR] : Tab must have only one child element, which must be a Window [ERROR] : Alloy compiler failed
  5. Manuel Conde Vendrell 2014-03-18

    Here is the running code. I cannot test it on iOS yet because my Mac is not here today, but the code for the tab is the same. Go to tab 3: info.
  6. Ritu Agrawal 2014-03-19

    Moving this ticket to engineering as I can reproduce this issue on iOS platform with the project Jira.zip file. Please click on "info" link at the bottom of the application screen to see the behavior. It works on Android platform as expected.
  7. Manuel Conde Vendrell 2017-01-25

    This can be close because was solved long time ago.

JSON Source