奇怪的搜索查看行为 [英] Strange SearchView behaviour

查看:111
本文介绍了奇怪的搜索查看行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我本来这跟ActionBarSherlock工作,但因为重新工作我的code使用我看到一个模糊的蓝色叠加时,搜索查看被扩大了android.support.v7库。

I originally had this working with ActionBarSherlock but since re-working my code to use the android.support.v7 libraries I'm seeing a blurred blue overlay when the SearchView is expanded.

以下是从我的Nexus 7的截图与软键盘打开。

The following is a screenshot from my Nexus 7 with the soft keyboard open.

当我关闭模糊的蓝色图像消失键盘,但仍然是一个模糊的搜索查看,如下图所示。

When I close the keyboard the blurred blue image disappears but there is still a blur to the SearchView as in the image below.

我使用的是菜单的XML文件来创建各种菜单项目 - 搜索产品如下...

I'm using a menu xml file to create the various menu items - the search item is as follows...

<item android:id="@+id/options_menu_search"
    android:title="@string/search"
    android:icon="@android:drawable/ic_menu_search"
    com.mycompany.mypackage:showAsAction="ifRoom|collapseActionView"
    com.mycompany.mypackage:actionViewClass="android.support.v7.widget.SearchView" >
</item>

它实际上在某种意义上工作,我可以进行搜索,但对我的生活,我不能工作了那里的模糊图像的来源。

It does actually work in the sense I can perform searches but for the life of me I can't work out where the blurred images are coming from.

我没有找到这个<一个href=\"http://stackoverflow.com/questions/13977952/searchview-drawables-in-actionbar-appear-blurred\">SearchView在动作条可绘出现模糊但我不会编程创建搜索查看公认的答案并不适用于我的问题。

I did find this SearchView drawables in ActionBar appear blurred but the accepted answer doesn't apply to my problem as I'm not creating the SearchView programatically.

有没有人见过相似,找到了解决?

Has anybody seen anything similar and found a fix?

推荐答案

我终于找到了答案这个问题。这似乎是在生成工具的错误。从V18开始任何导致此问题,现在我与生成工具V17坚持。

I eventually found an answer to this problem. It seems like a bug in the Build Tools. Anything from v18 onwards causes this problem and I'm now sticking with Build Tools v17.

请参阅此问题和OP的自己的答案(尤其是在结束编辑)...

See this question and the OP's own answer (particularly the EDIT at the end)...

<一个href=\"http://stackoverflow.com/questions/18288724/searchview-on-support-v7-appcompat-library-issue-default-9-patch-background-not\">Searchview在support.v7.appcompat.library问题:默认的9补丁背景不能正常显示

这篇关于奇怪的搜索查看行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆