mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Change day headers
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import observable = require("data/observable");
|
import observable = require("data/observable");
|
||||||
import button = require("ui/button");
|
import button = require("ui/button");
|
||||||
|
|
||||||
|
var dayHeaders = ["WORKSHOPS", "CONFERENCE DAY 1", "CONFERENCE DAY 2"];
|
||||||
|
|
||||||
export class AppViewModel extends observable.Observable {
|
export class AppViewModel extends observable.Observable {
|
||||||
public selectedViewIndex: number;
|
public selectedViewIndex: number;
|
||||||
|
|
||||||
@@ -42,6 +44,8 @@ export class AppViewModel extends observable.Observable {
|
|||||||
this._selectedIndex = value;
|
this._selectedIndex = value;
|
||||||
this.notify({ object: this, eventName: observable.knownEvents.propertyChange, propertyName: "selectedIndex", value: value });
|
this.notify({ object: this, eventName: observable.knownEvents.propertyChange, propertyName: "selectedIndex", value: value });
|
||||||
|
|
||||||
|
this.set("dayHeader", dayHeaders[value]);
|
||||||
|
|
||||||
if (this.search !== "") {
|
if (this.search !== "") {
|
||||||
this.search = "";
|
this.search = "";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<Label.formattedText>
|
<Label.formattedText>
|
||||||
<FormattedString fontSize="18" foregroundColor="#fac950">
|
<FormattedString fontSize="18" foregroundColor="#fac950">
|
||||||
<FormattedString.spans>
|
<FormattedString.spans>
|
||||||
<Span text="WORKSHOPS" fontAttributes="Bold" />
|
<Span text="{{ dayHeader }}" fontAttributes="Bold" />
|
||||||
</FormattedString.spans>
|
</FormattedString.spans>
|
||||||
</FormattedString>
|
</FormattedString>
|
||||||
</Label.formattedText>
|
</Label.formattedText>
|
||||||
|
|||||||
Reference in New Issue
Block a user