mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
stylers updated with get methods
This commit is contained in:
@ -826,10 +826,16 @@ export class DatePickerStyler implements definition.stylers.Styler {
|
|||||||
picker.setValueForKey(nativeValue, "textColor");
|
picker.setValueForKey(nativeValue, "textColor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static getColorProperty(view: view.View): any {
|
||||||
|
var picker = <UIDatePicker>view._nativeView;
|
||||||
|
return picker.valueForKey("textColor");
|
||||||
|
}
|
||||||
|
|
||||||
public static registerHandlers() {
|
public static registerHandlers() {
|
||||||
style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler(
|
style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler(
|
||||||
DatePickerStyler.setColorProperty,
|
DatePickerStyler.setColorProperty,
|
||||||
DatePickerStyler.resetColorProperty), "DatePicker");
|
DatePickerStyler.resetColorProperty,
|
||||||
|
DatePickerStyler.getColorProperty), "DatePicker");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -845,10 +851,16 @@ export class TimePickerStyler implements definition.stylers.Styler {
|
|||||||
picker.setValueForKey(nativeValue, "textColor");
|
picker.setValueForKey(nativeValue, "textColor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static getColorProperty(view: view.View): any {
|
||||||
|
var picker = <UIDatePicker>view._nativeView;
|
||||||
|
return picker.valueForKey("textColor");
|
||||||
|
}
|
||||||
|
|
||||||
public static registerHandlers() {
|
public static registerHandlers() {
|
||||||
style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler(
|
style.registerHandler(style.colorProperty, new stylersCommon.StylePropertyChangedHandler(
|
||||||
TimePickerStyler.setColorProperty,
|
TimePickerStyler.setColorProperty,
|
||||||
TimePickerStyler.resetColorProperty), "TimePicker");
|
TimePickerStyler.resetColorProperty,
|
||||||
|
TimePickerStyler.getColorProperty), "TimePicker");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user