Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searcher colour integration #496

Closed
moshpirit opened this issue Jul 2, 2015 · 4 comments
Closed

Searcher colour integration #496

moshpirit opened this issue Jul 2, 2015 · 4 comments
Assignees
Labels
Milestone

Comments

@moshpirit
Copy link

It should be white like the others buttons, shouldn't it?

screenshot_2015-07-02-14-35-08

@andrewnenakhov
Copy link
Member

@grigoryfedorov , possibly a bug, pls check it.

@aileronajay
Copy link

The text colour in the search can be changed by adding below code to setUpSearchView in ContactList.java. However for changing the associated icon we will need an icon file

int searchPlateId = searchView.getContext().getResources().getIdentifier("android:id/search_plate", null, null);
View searchPlate = searchView.findViewById(searchPlateId);
int searchTextId = searchPlate.getContext().getResources().getIdentifier("android:id/search_src_text", null, null);
TextView searchText = (TextView) searchPlate.findViewById(searchTextId);
if (searchText!=null) {
searchText.setTextColor(Color.WHITE);
searchText.setHintTextColor(Color.WHITE);
}

@aileronajay
Copy link

Though in SearchView.java, we have this code

if (a.hasValueOrEmpty(R.styleable.SearchView_searchHintIcon)) {
mSearchHintIcon = a.getDrawable(R.styleable.SearchView_searchHintIcon);
} else {
mSearchHintIcon = a.getDrawable(R.styleable.SearchView_searchIcon);
}
so it tries to get value from R.styleable.SearchView_searchHintIcon and R.styleable.SearchView_searchIcon for the icon to use

@andrewnenakhov
Copy link
Member

@moshpirit looks like it's fixed in latest releses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants