Skip to content

Instantly share code, notes, and snippets.

@HristoEftimov
Last active May 19, 2017 07:20
Show Gist options
  • Save HristoEftimov/271bf5432f45385a96aedc5fb5cd1408 to your computer and use it in GitHub Desktop.
Save HristoEftimov/271bf5432f45385a96aedc5fb5cd1408 to your computer and use it in GitHub Desktop.
NativeScript: scrollable application with a fixed bottom navigation with nice icon buttons
<ActionBar title="All cocktails"></ActionBar>
<GridLayout rows="*,60">
<ScrollView row="0">
<WrapLayout orientation="horizontal">
<GridLayout *ngFor="let item of data" width="50%" height="150">
<Image
src="~/images/{{ item.imageURL }}"
stretch="aspectFill"
row="1"
></Image>
<Label
row="1"
text="{{ item.title }}"
horizontalAlignment="center"
verticalAlignment="bottom"
backgroundColor="rgb(81,197,247, 0.8)"
width="100%"
padding="10"
fontSize="13"
color="white"
></Label>
</GridLayout>
</WrapLayout>
</ScrollView>
<StackLayout row="1" orientation="horizontal">
<Button textWrap="true" width="25%" textAlignment="text">
<FormattedString>
<Span text="&#xf015;\n" fontFamily="FontAwesome"></Span>
<Span text="Home"></Span>
</FormattedString>
</Button>
<Button textWrap="true" width="25%" textAlignment="text">
<FormattedString>
<Span text="&#xf000;\n" fontFamily="FontAwesome"></Span>
<Span text="All Cocktails"></Span>
</FormattedString>
</Button>
<Button textWrap="true" width="25%" textAlignment="text">
<FormattedString>
<Span text="&#xf005;\n" fontFamily="FontAwesome"></Span>
<Span text="Favorite"></Span>
</FormattedString>
</Button>
<Button textWrap="true" width="25%" textAlignment="text">
<FormattedString>
<Span text="&#xf007;\n" fontFamily="FontAwesome"></Span>
<Span text="Profile"></Span>
</FormattedString>
</Button>
</StackLayout>
</GridLayout>
@HristoEftimov
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment