In Flash Builder 4.6 I've created a Flex Mobile AIR Project.
Why is there neither the 2 buttons nor a scroll bar to see?
And why can't I swipe down to see more text and the 2 buttons?
Here is my complete and simple source code -
The "home view" - Agreement.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
title="HomeView">
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10" paddingLeft="10" gap="10" />
</s:layout>
<s:Label text="Agreement" width="100%" textAlign="center" />
<s:Label width="100%">
<s:text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincidunt rutrum felis eu tincidunt. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In auctor erat nec ligula vestibulum porttitor ornare quam facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc pretium elementum elit, vitae aliquet turpis facilisis tempus. Curabitur quis mi tellus, placerat bibendum erat. Vestibulum condimentum dolor eu purus fermentum pharetra. Suspendisse potenti. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla tempus aliquam vehicula.
Ut porta commodo interdum. Vestibulum et magna non felis malesuada mollis eu a dolor. Vivamus non diam purus, quis ultricies mi. Maecenas pharetra lorem ac elit tempor bibendum. Fusce gravida, enim et cursus dignissim, augue lectus consequat diam, sit amet laoreet urna eros a nisi. Phasellus id lacinia elit. Nullam pharetra tempor lobortis. Morbi non orci eget tellus consectetur euismod sed in diam. Sed sit amet fringilla massa. Sed quis ligula diam, ut vulputate odio. Donec dapibus diam vel libero tincidunt eu laoreet mauris adipiscing. </s:text>
</s:Label>
<s:Spacer height="100%" />
<s:HGroup width="100%" gap="10">
<s:Button label="I do not agree" width="50%" />
<s:Button label="I agree" width="50%" />
</s:HGroup>
</s:View>
And the app itself - Test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:ViewNavigatorApplication
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
firstView="views.Agreement">
</s:ViewNavigatorApplication>
Try this instead:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
title="HomeView">
<s:Scroller width="100%" height="100%">
<s:VGroup width="100%" height="100%" paddingTop="10" paddingBottom="10" paddingLeft="10" gap="10">
<s:Label text="Agreement" width="100%" textAlign="center" />
<s:Label width="100%">
<s:text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean tincidunt rutrum felis eu tincidunt. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In auctor erat nec ligula vestibulum porttitor ornare quam facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc pretium elementum elit, vitae aliquet turpis facilisis tempus. Curabitur quis mi tellus, placerat bibendum erat. Vestibulum condimentum dolor eu purus fermentum pharetra. Suspendisse potenti. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla tempus aliquam vehicula.
Ut porta commodo interdum. Vestibulum et magna non felis malesuada mollis eu a dolor. Vivamus non diam purus, quis ultricies mi. Maecenas pharetra lorem ac elit tempor bibendum. Fusce gravida, enim et cursus dignissim, augue lectus consequat diam, sit amet laoreet urna eros a nisi. Phasellus id lacinia elit. Nullam pharetra tempor lobortis. Morbi non orci eget tellus consectetur euismod sed in diam. Sed sit amet fringilla massa. Sed quis ligula diam, ut vulputate odio. Donec dapibus diam vel libero tincidunt eu laoreet mauris adipiscing. </s:text>
</s:Label>
<s:Spacer height="100%" />
<s:HGroup width="100%" gap="10">
<s:Button label="I do not agree" width="50%" />
<s:Button label="I agree" width="50%" />
</s:HGroup>
</s:VGroup>
</s:Scroller>
</s:View>
In Flex 4, you need to specify if someone needs to scroll by using the Scroller :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With