mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
@ -1,16 +1,11 @@
|
|||||||
import colorModule = require("color");
|
import { SearchBar } from "ui/search-bar";
|
||||||
import searchBarModule = require("ui/search-bar");
|
import { Color } from "color";
|
||||||
|
import * as utils from "utils/utils";
|
||||||
|
|
||||||
export function getNativeHintColor(searchBar: searchBarModule.SearchBar): colorModule.Color {
|
export function getNativeHintColor(searchBar: SearchBar): Color {
|
||||||
// TODO: This test needs to be created
|
return (<any>searchBar)._placeholderLabel ? utils.ios.getColor((<any>searchBar)._placeholderLabel.textColor) : undefined;
|
||||||
return undefined;
|
|
||||||
}
|
}
|
||||||
export function getNativeFontSize(searchBar: searchBarModule.SearchBar): number {
|
export function getNativeFontSize(searchBar: SearchBar): number {
|
||||||
var sf = <UITextField>(<any>searchBar)._textField;
|
return (<any>searchBar)._textField ? (<any>searchBar)._textField.font.pointSize : undefined;
|
||||||
if (sf) {
|
|
||||||
return sf.font.pointSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,11 +28,6 @@ export var testSearchBarHintColorAndroid = function () {
|
|||||||
helper.buildUIAndRunTest(_createSearchBarFunc(), function (views: Array<viewModule.View>) {
|
helper.buildUIAndRunTest(_createSearchBarFunc(), function (views: Array<viewModule.View>) {
|
||||||
var searchBar = <searchBarModule.SearchBar>views[0];
|
var searchBar = <searchBarModule.SearchBar>views[0];
|
||||||
|
|
||||||
// TODO: create IOS test once IOS support is working
|
|
||||||
if (!searchBar.android) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
searchBar.text = "";
|
searchBar.text = "";
|
||||||
searchBar.hint = "hint color test";
|
searchBar.hint = "hint color test";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user