0
This is the EDIT image: it shows the space i want to remove;我正在搜索我的應用程序。我似乎無法刪除「SearchView」圖標。如何刪除SearchView刪除圖標
這裏的XML:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="#e9eaea"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:padding="0dp"
tools:context="com.echo.isaac.echo_simplyawesome.Search">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
android:background="@color/colorPrimary"
android:contentInsetStart="0dp"
android:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetLeft="0dp"
tools:targetApi="lollipop">
<SearchView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/searchView"
android:queryHint="@string/search"
android:iconifiedByDefault="false"
android:paddingLeft="-16dp"
android:paddingStart="-16dp"
android:theme="@style/SearchViewStyle"
android:background="@drawable/input_background_teal"
android:queryBackground="@drawable/input_background_teal"
tools:targetApi="lollipop_mr1" />
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
</android.support.design.widget.CoordinatorLayout>
我只是想刪除旁邊的搜索查看文本框中的圖標。所以我沒有在它旁邊有一個很大的空白空間。提前致謝!
由於生病嘗試,現在和後反應 –
我能夠可見性設置爲走了,但仍然取得了間距相同 –
searchImage是對我來說是空的 – jiawen