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 button = require("ui/button");
|
||||
|
||||
var dayHeaders = ["WORKSHOPS", "CONFERENCE DAY 1", "CONFERENCE DAY 2"];
|
||||
|
||||
export class AppViewModel extends observable.Observable {
|
||||
public selectedViewIndex: number;
|
||||
|
||||
@@ -42,6 +44,8 @@ export class AppViewModel extends observable.Observable {
|
||||
this._selectedIndex = value;
|
||||
this.notify({ object: this, eventName: observable.knownEvents.propertyChange, propertyName: "selectedIndex", value: value });
|
||||
|
||||
this.set("dayHeader", dayHeaders[value]);
|
||||
|
||||
if (this.search !== "") {
|
||||
this.search = "";
|
||||
} else {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<Label.formattedText>
|
||||
<FormattedString fontSize="18" foregroundColor="#fac950">
|
||||
<FormattedString.spans>
|
||||
<Span text="WORKSHOPS" fontAttributes="Bold" />
|
||||
<Span text="{{ dayHeader }}" fontAttributes="Bold" />
|
||||
</FormattedString.spans>
|
||||
</FormattedString>
|
||||
</Label.formattedText>
|
||||
|
||||
Reference in New Issue
Block a user