[TIMOB-25668] Android: HintTextColor for SearchView
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-05-01T17:15:03.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 7.3.0 |
Components | Android |
Labels | android, demo_app, hinttext |
Reporter | Michael Gangolf |
Assignee | Hans Knöchel |
Created | 2018-01-13T15:18:44.000+0000 |
Updated | 2018-06-11T14:19:11.000+0000 |
Description
*Problem:*
The
Ti.UI.Android.SearchView
has no property to change the hintTextColor
. In a light theme the color is always white and you can't see the hintText.
*Solution:*
Add hintTextColor
as a property. Since it is Android-only no parity is needed.
*Example*
var win = Ti.UI.createWindow({
fullscreen: false,
theme: "Theme.AppCompat.Light"
});
// Use action bar search view
var search = Ti.UI.Android.createSearchView({
hintText: "Table Search",
color: "#000",
hintTextColor: "#999",
iconifiedByDefault: false
});
var data = [];
data.push(Ti.UI.createTableViewRow({
title: 'Apple'
}));
data.push(Ti.UI.createTableViewRow({
title: 'Banana'
}));
data.push(Ti.UI.createTableViewRow({
title: 'Orange'
}));
data.push(Ti.UI.createTableViewRow({
title: 'Raspberry'
}));
var tableview = Titanium.UI.createTableView({
data: data,
search: search
});
win.add(tableview);
win.open();
PR: https://github.com/appcelerator/titanium_mobile/pull/9729
FR Passed waiting for the PR to be merged. https://github.com/appcelerator/titanium_mobile/pull/9729
Closing ticket. Improvement can be seen in SDK Version: 7.3.0.v20180607210411 Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/9729