我有问题来为ActionBar SearchView(支持v7)设置建议列表的样式。
我需要更改哪个样式属性来更改背景和文本颜色?
Ralph
我有问题来为ActionBar SearchView(支持v7)设置建议列表的样式。
我需要更改哪个样式属性来更改背景和文本颜色?
Ralph
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.search_menu, menu);
MenuItem searchItem = menu.findItem(R.id.action_search);
SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
// Theme the SearchView's AutoCompleteTextView drop down. For some reason this wasn't working in styles.xml
SearchAutoComplete autoCompleteTextView = (SearchAutoComplete) searchView.findViewById(R.id.search_src_text);
if (autoCompleteTextView != null) {
autoCompleteTextView.setDropDownBackgroundResource(R.drawable.abc_search_dropdown_light);
}
}