Use new material search icon with material theme
This commit is contained in:
parent
4671261f1c
commit
15572f0ac0
BIN
res/drawable-hdpi/ic_action_search.png
Normal file
BIN
res/drawable-hdpi/ic_action_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 396 B |
BIN
res/drawable-mdpi/ic_action_search.png
Normal file
BIN
res/drawable-mdpi/ic_action_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 247 B |
BIN
res/drawable-xhdpi/ic_action_search.png
Normal file
BIN
res/drawable-xhdpi/ic_action_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 465 B |
BIN
res/drawable-xxhdpi/ic_action_search.png
Normal file
BIN
res/drawable-xxhdpi/ic_action_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 728 B |
BIN
res/drawable-xxxhdpi/ic_action_search.png
Normal file
BIN
res/drawable-xxxhdpi/ic_action_search.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 915 B |
@ -814,7 +814,14 @@ public class LibraryActivity
|
||||
// Call super after adding the now-playing view as this should be the first item
|
||||
super.onCreateOptionsMenu(menu);
|
||||
|
||||
mSearchMenuItem = menu.add(0, MENU_SEARCH, 0, R.string.search).setIcon(R.drawable.ic_menu_search);
|
||||
// Check if we're running on Android 5.0 or higher
|
||||
if (ThemeHelper.usesHoloTheme()) {
|
||||
// Keep using the old icon
|
||||
mSearchMenuItem = menu.add(0, MENU_SEARCH, 0, R.string.search).setIcon(R.drawable.ic_menu_search);
|
||||
} else {
|
||||
// Use the new material search icon
|
||||
mSearchMenuItem = menu.add(0, MENU_SEARCH, 0, R.string.search).setIcon(R.drawable.ic_action_search);
|
||||
}
|
||||
mSearchMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW | MenuItem.SHOW_AS_ACTION_ALWAYS);
|
||||
SearchView mSearchView = new SearchView(getActionBar().getThemedContext());
|
||||
mSearchView.setOnQueryTextListener(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user