Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25668] Android: HintTextColor for SearchView

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-01T17:15:03.000+0000
Affected Version/sn/a
Fix Version/sRelease 7.3.0
ComponentsAndroid
Labelsandroid, demo_app, hinttext
ReporterMichael Gangolf
AssigneeHans Knöchel
Created2018-01-13T15:18:44.000+0000
Updated2018-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();

Comments

  1. Michael Gangolf 2018-01-13

    PR: https://github.com/appcelerator/titanium_mobile/pull/9729
  2. Samir Mohammed 2018-01-17

    FR Passed waiting for the PR to be merged. https://github.com/appcelerator/titanium_mobile/pull/9729
  3. Samir Mohammed 2018-06-11

    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

JSON Source