神秘的线EDITTEXT周围软组织从搜索查看 [英] mysterious line arround editText from searchview
问题描述
我有一个搜索查看我改变了他们的箱子的EditText用绘制(以java code)。不过,我有一个神秘的边界,我无法删除。如果你看到的截图,你会看到红色的线是在绘制editext.xml定义的边界我的问题是我不知道什么是黑线约于EditText上。任何人都知道是什么,我怎么去除呢?
I have a searchview and i changed the edittext box of them with a drawable (with java code). However I have a mysterious border that i can't remove. If you see the screenshot you will see the red line that is a border defined in drawable 'editext.xml' My problem is I doesn't know what is the black line arround the edittext. Anybody know what is and how i remove it?
绘制(EditText上):
drawable (edittext):
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dip" android:color="#c66262" />
<solid android:color="#FFFFFF" />
</shape>
绘制(搜索查看):
drawable (searchview):
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:padding="10dp">
<solid android:color="#FFFFFF"/>
<stroke android:width="1dip" android:color="#000000" />
<corners
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp"
android:topRightRadius="10dp"/>
</shape>
acitivty XML:
acitivty xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".SearchActivity" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="160sp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:background="@drawable/search_background"
android:orientation="vertical" >
<SearchView
android:id="@+id/searchView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20sp"
android:layout_marginRight="20sp"
android:layout_marginTop="60sp"
android:actionViewClass="android.widget.SearchView"
android:background="@drawable/searchview"
android:fitsSystemWindows="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:iconifiedByDefault="false"
android:paddingLeft="10sp"
android:paddingTop="5sp"
android:showAsAction="collapseActionView" >
</SearchView>
</LinearLayout>
</RelativeLayout>
截图: http://imageshack.com/a/img842/6100/ebsb。 JPG
在此先感谢
推荐答案
刚刚从下面绘制(搜索查看)行删除:
Just remove following line from drawable(searchview):
行程机器人:宽=1dip机器人:颜色=#000000
stroke android:width="1dip" android:color="#000000"
这篇关于神秘的线EDITTEXT周围软组织从搜索查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!