File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed
apps/app/ui-tests-app/action-bar Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ import { Label } from "tns-core-modules/ui/Label" ;
2+ import { Page } from "tns-core-modules/ui/Page" ;
3+
4+ export function onNavigateTo ( args ) {
5+ const actionBar = ( < Page > args . object ) . actionBar ;
6+ args . object . flatPropertyValue = < Label > args . object . getViewById ( "flatPropertyValue" ) ;
7+ actionBar . flat = true ;
8+ args . object . flatPropertyValue . text = "Action bar flat property is set to: " + actionBar . flat ;
9+ }
10+
11+ export function changeFlatPropertyValue ( args ) {
12+ const actionBar = ( < Page > args . object . page ) . actionBar ;
13+ actionBar . flat = ! actionBar . flat ;
14+ args . object . page . flatPropertyValue . text = "Action bar flat property is set to: " + actionBar . flat ;
15+ }
Original file line number Diff line number Diff line change 1+ <Page navigatedTo =" onNavigateTo" >
2+ <Page .actionBar>
3+ <ActionBar title =" Flat property" />
4+ </Page .actionBar>
5+ <StackLayout >
6+ <Button margin =" 30" text =" change flat property" tap =" changeFlatPropertyValue" />
7+ <Label id =" flatPropertyValue" />
8+ </StackLayout >
9+ </Page >
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ export function loadExamples() {
2121 examples . set ( "actTransparentBgCss" , "action-bar/transparent-bg-css" ) ;
2222 examples . set ( "modalHiddenActBar" , "action-bar/modal-test-hidden-action-bar" ) ;
2323 examples . set ( "modalShownActBar" , "action-bar/modal-test-with-action-bar" ) ;
24+ examples . set ( "flat" , "action-bar/flat" ) ;
2425
2526 return examples ;
2627}
You can’t perform that action at this time.
0 commit comments