mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix - nav button with reflection
This commit is contained in:
@@ -18,3 +18,21 @@ export function buttonTap(args: observable.EventData) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var j = 0;
|
||||
export function visibilityTap(args: observable.EventData) {
|
||||
var page = <pages.Page>view.getAncestor(<view.View>args.object, "Page")
|
||||
|
||||
if (j % 3 === 0) {
|
||||
page.actionBar.androidIconVisibility = "always";
|
||||
}
|
||||
else if (j % 3 === 1) {
|
||||
page.actionBar.androidIconVisibility = "never";
|
||||
}
|
||||
else if (j % 3 === 2) {
|
||||
page.actionBar.androidIconVisibility = "auto";
|
||||
}
|
||||
j++;
|
||||
console.log("Visibility changed to: " + page.actionBar.androidIconVisibility);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
</Page.actionBar>
|
||||
<StackLayout>
|
||||
<Button text="button" tap="buttonTap"/>
|
||||
<Button text="change main icon visibility" tap="visibilityTap"/>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user