diff --git a/apps/app/ui-tests-app/action-bar/action-item-position.ts b/apps/app/ui-tests-app/action-bar/action-item-position.ts new file mode 100644 index 000000000..ffbc52da2 --- /dev/null +++ b/apps/app/ui-tests-app/action-bar/action-item-position.ts @@ -0,0 +1,39 @@ +import { EventData } from "data/observable"; +import { Page } from "ui/page"; +import observable = require("data/observable"); + +export function navigatingTo(args: EventData) { + let page = args.object; + page.bindingContext = new ActionItemPostitionView(); +} + +export class ActionItemPostitionView extends observable.Observable { + private _values = ["-i---", "---i---", "---i-"]; + private _count: number; + private _text: string; + + constructor() { + super(); + this._count = 0; + } + + get text(): string { + return this._text; + } + + set text(value: string) { + if (this._text !== value) { + this._text = value; + this.notifyPropertyChange("text", value) + } + } + + public onTap() { + this.change(); + } + + public change() { + let index = this._count++ % 3; + this.text = this._values[index]; + } +} \ No newline at end of file diff --git a/apps/app/ui-tests-app/action-bar/action-item-position.xml b/apps/app/ui-tests-app/action-bar/action-item-position.xml new file mode 100644 index 000000000..b442c297f --- /dev/null +++ b/apps/app/ui-tests-app/action-bar/action-item-position.xml @@ -0,0 +1,16 @@ + + + + + +