[TIMOB-16643] iOS: Ti.UI.SIZE inside a View works differently for Android and iOS for layout="vertical"
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.2.2 |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Manuel Conde Vendrell |
Assignee | Unknown |
Created | 2014-03-14T18:36:05.000+0000 |
Updated | 2018-02-28T20:04:15.000+0000 |
Description
I have one view inside a scrollview:
* 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.
<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 *Attachments
File | Date | Size |
---|---|---|
Error iOS.png | 2014-03-14T18:36:05.000+0000 | 52401 |
Expected iOS.png | 2014-03-14T18:36:05.000+0000 | 103272 |
info.tss | 2014-03-17T08:31:52.000+0000 | 1249 |
info.xml | 2014-03-17T08:31:52.000+0000 | 7637 |
Jira.zip | 2014-03-18T08:34:14.000+0000 | 5908565 |
Right in Android.png | 2014-03-14T18:36:05.000+0000 | 26332 |
Screen Shot 2014-03-16 at 7.54.21 PM.png | 2014-03-17T02:56:07.000+0000 | 28757 |
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.
Ok, here is the original code, so you can test.
All inside this index.xml:
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
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.
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.
This can be close because was solved long time ago.