AutoCompleteTextView weird behavior in LolliPop device

I am using AutoCompleteTextView in my layout. But it colorControlNormal and Activate does not work as I expected.

My color value is #0072BA .

The figure below is for different devices.

1.) Android Kitkat

enter image description here

2.) Android LolliPop

enter image description here

3.) Android Marshmallow

enter image description here

The xml code I used is below

  <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="@color/md_black_1000" android:layout_marginTop="5dp" android:textSize="15sp" android:text="Medical Store Name" android:textColorHint="#999999" android:layout_below="@+id/search_drug_store" android:id="@+id/autoCompleteTextView_storename" android:layout_marginLeft="15dp" android:layout_marginRight="10dp"/> <AutoCompleteTextView android:id="@+id/autoCompleteTextView1" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:textSize="12sp" android:textColor="#999999" android:layout_below="@+id/autoCompleteTextView_storename" android:layout_marginLeft="25dp" android:inputType="textNoSuggestions" android:layout_marginRight="10dp"/> 

I don't give any AutoCompleteTextView style, and then why is this happening?

What I tried:

If I give this style

Reference to the reference material:

http://www.materialdoc.com/autocomplete-view/

and enter this style

  <style name="Autocomplete" parent="Widget.AppCompat.Light.AutoCompleteTextView"> <item name="android:background">@color/green500</item> <item name="colorControlNormal">@color/amber500</item> <item name="colorControlActivated">@color/cyan500</item> </style> 

But nothing has changed in Lollipop.

Is this a bug in the lollipop version or am I something wrong?

+7
android android-layout android-5.1.1-lollipop android-design-library autocompletetextview
source share
2 answers

this is actually not a solution to this problem, but you can use it for a unique design throughout the device. I implemented for edittext like this in xml, set the background value to null for edittext and add a horizontal line below edittext.

  <EditText android:id="@+id/newPasswordEditText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginLeft="@dimen/activity_horizontal_margin" android:background="@null" android:textColor="@color/color_black" android:inputType="textPassword" android:layout_marginBottom="10dp" android:hint="Enter New Password" android:layout_marginTop="10dp" android:textSize="14sp" android:layout_below="@+id/titleTextView" /> <LinearLayout android:id="@+id/linearLayout2" android:layout_width="match_parent" android:layout_height="2dp" android:orientation="horizontal" android:layout_marginBottom="7dp" android:layout_marginLeft="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_below="@+id/newPasswordEditText" android:background="@color/color_standard_green" /> 
0
source share

There is no error in the lollipop version, you simply do not redefine the theme style with your own style, use fooobar.com/questions/26491 / ... in this way

0
source share

All Articles