mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed failing tests and added page for ui-tests
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import colorModule = require("color");
|
||||
import utilsModule = require("utils/utils");
|
||||
import enums = require("ui/enums");
|
||||
import background = require("ui/styling/background");
|
||||
|
||||
export function getNativeText(button: buttonModule.Button): string {
|
||||
return button.android.getText();
|
||||
@@ -17,7 +18,14 @@ export function getNativeColor(button: buttonModule.Button): colorModule.Color {
|
||||
}
|
||||
|
||||
export function getNativeBackgroundColor(button: buttonModule.Button): colorModule.Color {
|
||||
return new colorModule.Color((<any>button.android.getBackground()).backgroundColor);
|
||||
var bkg = <any>button.android.getBackground();
|
||||
var color;
|
||||
if (bkg instanceof background.ad.BorderDrawable) {
|
||||
return (<background.ad.BorderDrawable>bkg).background.color;
|
||||
}
|
||||
else {
|
||||
return new colorModule.Color(bkg.backgroundColor)
|
||||
}
|
||||
}
|
||||
|
||||
export function getNativeTextAlignment(button: buttonModule.Button): string {
|
||||
|
||||
Reference in New Issue
Block a user