简体   繁体   English

摆脱SearchView上的箭头按钮?

[英]Get rid of arrow button on SearchView?

I am using a search view in my Android App and I am trying to get rid of the blue underline. 我在Android应用中使用搜索视图,并且试图摆脱蓝色下划线。 I managed to get rid of the blue underline that appears under the text using: 我设法使用以下方法消除了出现在文本下方的蓝色下划线:

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

However there is an arrow button to the right of the text within the searchview that still has the blue underline. 但是,searchview内的文本右侧有一个箭头按钮,其下划线仍为蓝色。 I either want to get rid of this arrow or get rid of the underline. 我要么想摆脱这个箭头,要么摆脱下划线。

Here is a screenshot of what the searchview looks like: http://tinypic.com/r/fvzl74/8 这是searchview的屏幕截图: http ://tinypic.com/r/fvzl74/8

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM