Remove underline from AutoCompleteTextView via xml

I have this view:

<AutoCompleteTextView android:id="@+id/search_bar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignBottom="@+id/rect_search" android:layout_alignLeft="@+id/rect_search" android:layout_alignRight="@+id/rect_search" android:layout_alignTop="@+id/rect_search" android:hint="@string/search_bar" android:textSize="20sp" /> 

as you can see, this view goes into another view, rect_search, i.e. ImageView. Now I noticed that the AutoCompleteTextView widget has a lower bound by default, and I will remove it. Is it possible?

+6
source share
3 answers

Just put:

 android:background="@android:color/transparent" 

inside your view.

+14
source

Android: inputType = "textPhonetic"

+3
source

This will also work fine

 android:inputType="textNoSuggestions" 
+1
source

All Articles