()
| 3 | import * as layout from '@nativescript/core/ui/layouts/stack-layout'; |
| 4 | |
| 5 | export function createPage() { |
| 6 | var page = new pages.Page(); |
| 7 | var linearLayout = new layout.StackLayout(); |
| 8 | |
| 9 | var btn = addButton(linearLayout, 'left'); |
| 10 | btn.marginLeft = 100; |
| 11 | btn = addButton(linearLayout, 'center'); |
| 12 | btn.marginTop = 100; |
| 13 | btn = addButton(linearLayout, 'right'); |
| 14 | btn.marginRight = 100; |
| 15 | |
| 16 | btn = addButton(linearLayout, 'stretch'); |
| 17 | btn.marginLeft = 100; |
| 18 | btn.marginRight = 100; |
| 19 | btn.marginTop = 100; |
| 20 | btn.marginBottom = 100; |
| 21 | |
| 22 | page.content = linearLayout; |
| 23 | |
| 24 | return page; |
| 25 | } |
| 26 | |
| 27 | function addButton(layout: layout.StackLayout, text: 'left' | 'center' | 'right' | 'stretch') { |
| 28 | var btn = new btns.Button(); |
nothing calls this directly
no test coverage detected