mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
add safe area support to flexbox
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
|
||||
xmlns:fragments="flexboxlayout/fragments">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Action Bar"></Label>
|
||||
</ActionBar>
|
||||
|
||||
<fragments:flexboxlayout-col-fragment></fragments:flexboxlayout-col-fragment>
|
||||
|
||||
</Page>
|
||||
@@ -8,10 +8,12 @@
|
||||
<StackLayout>
|
||||
<Label text="Pages w/ ActionBar"></Label>
|
||||
<Button text="Flexbox Row" tap="onNavigate" route="flexboxlayout/action-bar/flexboxlayout-row-page"></Button>
|
||||
<Button text="Flexbox Col" tap="onNavigate" route="flexboxlayout/action-bar/flexboxlayout-col-page"></Button>
|
||||
</StackLayout>
|
||||
<StackLayout>
|
||||
<Label text="Pages w/o ActionBar"></Label>
|
||||
<Button text="Flexbox Row" tap="onNavigate" route="flexboxlayout/no-action-bar/flexboxlayout-row-page"></Button>
|
||||
<Button text="Flexbox Col" tap="onNavigate" route="flexboxlayout/no-action-bar/flexboxlayout-col-page"></Button>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<FlexboxLayout flexDirection="column" class="flex">
|
||||
<StackLayout backgroundColor="white">
|
||||
<Label text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis euismod fermentum erat, eu vehicula nunc scelerisque quis. Aenean consequat elit sed lacus aliquam consequat."></Label>
|
||||
</StackLayout>
|
||||
<StackLayout flexGrow="1" backgroundColor="green">
|
||||
<Label text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis euismod fermentum erat, eu vehicula nunc scelerisque quis. Aenean consequat elit sed lacus aliquam consequat."></Label>
|
||||
</StackLayout>
|
||||
<StackLayout backgroundColor="red">
|
||||
<Label text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis euismod fermentum erat, eu vehicula nunc scelerisque quis. Aenean consequat elit sed lacus aliquam consequat."></Label>
|
||||
</StackLayout>
|
||||
</FlexboxLayout>
|
||||
@@ -1,11 +1,11 @@
|
||||
<FlexboxLayout flexDirection="row" class="flex">
|
||||
<StackLayout backgroundColor="white">
|
||||
<Label text="Lorem"></Label>
|
||||
</StackLayout>
|
||||
<StackLayout flexGrow="1" backgroundColor="green">
|
||||
<Label text="Lorem"></Label>
|
||||
</StackLayout>
|
||||
<StackLayout backgroundColor="red">
|
||||
<Label backgroundColor="#965251" text="Item"></Label>
|
||||
</StackLayout>
|
||||
<StackLayout flexGrow="1" class="stack">
|
||||
<Label flexGrow="1" backgroundColor="#d2b29b" text="Flex-Grow 1"></Label>
|
||||
</StackLayout>
|
||||
<StackLayout backgroundColor="blue">
|
||||
<Label backgroundColor="#F69256" text="Item"></Label>
|
||||
<Label text="Lorem"></Label>
|
||||
</StackLayout>
|
||||
</FlexboxLayout>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd"
|
||||
xmlns:fragments="flexboxlayout/fragments"
|
||||
actionBarHidden="true">
|
||||
|
||||
<fragments:flexboxlayout-col-fragment></fragments:flexboxlayout-col-fragment>
|
||||
|
||||
</Page>
|
||||
@@ -1,4 +1,4 @@
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd">
|
||||
<Page xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
|
||||
|
||||
<ActionBar>
|
||||
<Label text="Home"></Label>
|
||||
@@ -20,6 +20,7 @@
|
||||
<Button text="Expand Examples" tap="onNavigate" route="expand/expand-page"></Button>
|
||||
<Button text="Repeater Examples" tap="onNavigate" route="repeater/repeater-page"></Button>
|
||||
<Button text="WebView Examples" tap="onNavigate" route="webview/webview-page"></Button>
|
||||
<Button text="Flexbox Examples" tap="onNavigate" route="flexboxlayout/flexboxlayout-page"></Button>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user