【问题标题】:Get rid of arrow button on SearchView?摆脱 SearchView 上的箭头按钮?
【发布时间】:2014-06-22 21:04:01
【问题描述】:

我正在我的 Android 应用程序中使用搜索视图,并且我正在尝试摆脱蓝色下划线。我设法摆脱了文本下方出现的蓝色下划线:

int searchPlateId = searchView.getContext().getResources().getIdentifier("android:id/search_plate", null, null);
View searchPlateView = searchView.findViewById(searchPlateId);
if (searchPlateView != null) {
    searchPlateView.setBackgroundColor(Color.TRANSPARENT);
}

但是,搜索视图中文本右侧的箭头按钮仍然带有蓝色下划线。我要么想去掉这个箭头,要么去掉下划线。

这是搜索视图的截图:http://tinypic.com/r/fvzl74/8

【问题讨论】:

  • 您能否在某处发布屏幕截图并链接到它,说明您所指的内容?
  • 这是搜索视图的截图:tinypic.com/r/fvzl74/8(如您所见,蓝线仍在箭头下方)

标签: java android android-studio


【解决方案1】:

我使用 .setSubmitButtonEnabled(false) 摆脱了它

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-02-23
    • 1970-01-01
    • 2019-01-25
    • 1970-01-01
    • 1970-01-01
    • 2013-07-31
    • 2017-11-16
    相关资源
    最近更新 更多