various tests fixed

This commit is contained in:
Vladimir Enchev
2015-06-12 15:50:31 +03:00
parent 4673b97eae
commit 072ffed26b
4 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ export function getNativeColor(button: buttonModule.Button): colorModule.Color {
} }
export function getNativeBackgroundColor(button: buttonModule.Button): colorModule.Color { export function getNativeBackgroundColor(button: buttonModule.Button): colorModule.Color {
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>button.android.getBackground()).getColor()); return new colorModule.Color((<any>button.android.getBackground()).backgroundColor);
} }
export function getNativeTextAlignment(button: buttonModule.Button): string { export function getNativeTextAlignment(button: buttonModule.Button): string {

View File

@ -223,7 +223,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
normalColor = actualColors.getDefaultColor() normalColor = actualColors.getDefaultColor()
TKUnit.assert(normalColor, "Expected: " + expColor + ", Actual: " + normalColor); TKUnit.assert(normalColor, "Expected: " + expColor + ", Actual: " + normalColor);
actualBackgroundColor = (<android.graphics.drawable.ColorDrawable>testLabel.android.getBackground()).getColor(); actualBackgroundColor = (<any>testLabel.android.getBackground()).backgroundColor;
expBackgroundColor = android.graphics.Color.parseColor(backgroundColor); expBackgroundColor = android.graphics.Color.parseColor(backgroundColor);
TKUnit.assertEqual(actualBackgroundColor, expBackgroundColor); TKUnit.assertEqual(actualBackgroundColor, expBackgroundColor);
} }

View File

@ -26,7 +26,7 @@ export function getNativeColor(textField: textFieldModule.TextField): colorModul
} }
export function getNativeBackgroundColor(textField: textFieldModule.TextField): colorModule.Color { export function getNativeBackgroundColor(textField: textFieldModule.TextField): colorModule.Color {
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>textField.android.getBackground()).getColor()); return new colorModule.Color((<any>textField.android.getBackground()).backgroundColor);
} }
export function getNativeTextAlignment(textField: textFieldModule.TextField): string { export function getNativeTextAlignment(textField: textFieldModule.TextField): string {

View File

@ -30,7 +30,7 @@ export function getNativeColor(textView: textViewModule.TextView): colorModule.C
} }
export function getNativeBackgroundColor(textView: textViewModule.TextView): colorModule.Color { export function getNativeBackgroundColor(textView: textViewModule.TextView): colorModule.Color {
return new colorModule.Color((<android.graphics.drawable.ColorDrawable>textView.android.getBackground()).getColor()); return new colorModule.Color((<any>textView.android.getBackground()).backgroundColor);
} }
export function getNativeTextAlignment(textView: textViewModule.TextView): string { export function getNativeTextAlignment(textView: textViewModule.TextView): string {