stylers removed

This commit is contained in:
Vladimir Enchev
2015-12-21 15:10:06 +02:00
parent 22af9e8199
commit d50e2fdb37
48 changed files with 2531 additions and 2457 deletions

View File

@@ -1,6 +1,9 @@
import aiCommon = require("./activity-indicator-common");
import dependencyObservable = require("ui/core/dependency-observable");
import proxy = require("ui/core/proxy");
import styling = require("ui/styling");
import style = require("ui/styling/style");
import view = require("ui/core/view");
function onBusyPropertyChanged(data: dependencyObservable.PropertyChangeData) {
var indicator = <ActivityIndicator>data.object;
@@ -32,3 +35,29 @@ export class ActivityIndicator extends aiCommon.ActivityIndicator {
return this._ios;
}
}
export class ActivityIndicatorStyler implements style.Styler {
private static setColorProperty(view: view.View, newValue: any) {
var bar = <UIActivityIndicatorView>view.ios;
bar.color = newValue;
}
private static resetColorProperty(view: view.View, nativeValue: any) {
var bar = <UIActivityIndicatorView>view.ios;
bar.color = nativeValue;
}
private static getNativeColorValue(view: view.View): any {
var bar = <UIActivityIndicatorView>view.ios;
return bar.color;
}
public static registerHandlers() {
style.registerHandler(style.colorProperty, new style.StylePropertyChangedHandler(
ActivityIndicatorStyler.setColorProperty,
ActivityIndicatorStyler.resetColorProperty,
ActivityIndicatorStyler.getNativeColorValue), "ActivityIndicator");
}
}
ActivityIndicatorStyler.registerHandlers();