android - 对 searchView 使用 Android Studio 默认搜索图标

标签 android android-studio android-drawable android-image android-icons

似乎无法为我的 actionBar 的 searchView 找到正确的搜索图标。 Android Studio 是否甚至提供了一个不错的,还是我必须创建自己的?

这是 Android Studio 中提供的内容:(我想要所有的白色图标)

android:icon="@android:drawable/ic_menu_search" 

enter image description here

这个搜索图标对我不起作用。

================================================

这是另一个不适用于我的白色图标的 Android Studio 图标:
android:icon="@android:drawable/ic_search_category_default"

enter image description here

===============================================
android:icon="@drawable/ic_search_black_24dp"

来自 Image Asset Folder --> Clip Art 的最终 Android Studio 可用搜索图标。它最后是一个白色图标,但它的位置高于设置图标。不知道为什么。

enter image description here

我需要一个像最后一个一样的白色图标,但要与设置图标位于相同的位置。有什么办法可以降低图标而不让它在其他手机上看起来很奇怪?我必须创建自己的图标吗?如果需要,尺寸是多少?为什么 Android Studio 把白色的搜索图标放在比其他图标那么高的位置?

最佳答案

您也可以在 https://material.io/icons/ 中访问此图标列表
来自安卓工作室

enter image description here

enter image description here

关于android - 对 searchView 使用 Android Studio 默认搜索图标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47338053/

相关文章:

android - 如何为按钮使用波纹效果

android - 使用startApp测试设备

java - 错误 :error: '__ANDROID_API__' macro redefined [-Werror, -Wmacro-redefined] -Android Studio

Android:仅使用 xxhdpi 图像

android - 可绘制资源应用程序启动器图标大小

java - getGlobalVisibleRect() 究竟是什么?

Android Studio - 构建失败 '/home/node/Android/Sdk/build-tools/23.0.2/aapt' '以非零退出值 1 完成

android-studio - 无法计算哈希值

mysql - 无法使用 wamp 服务器和 php 将数据插入我的数据库

android - 可绘制圆形四色边框