Android Question AutoCompleteEditText Style don't work

jnbarban

Member
Licensed User
Longtime User
Hello,
I am having a problem with the AutoCompleteEditText styling.

It works with AutoCompleteEditText which are in design layouts but not with those added programmatically.

I do not encounter this problem with other types of view

In my Manifest:

SetApplicationAttribute(android:theme, "@style/Theme.MyApp")

CreateResource(values, theme.xml,
<resources>
<style name="Theme.MyApp" parent="Theme.AppCompat.NoActionBar">
<item name="android:autoCompleteTextViewStyle">@style/AutoCompleteTextViewStyle</item>
</style>

<style name="AutoCompleteTextViewStyle" parent="@android:style/Widget.AutoCompleteTextView" >
<item name="android:textColor">#000000</item>
<item name="android:textColorHint">#555555</item>
<item name="android:background">#FFFFFF</item>
<item name="android: padding">10dip</item>
<item name="android:layout_margin">10dip</item>
</style>
</resources>
)
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
It works with AutoCompleteEditText which are in design layouts but not with those added programmatically.

You should not add them by code if they are customviews.
Add them within a layout.
 
Upvote 0

jnbarban

Member
Licensed User
Longtime User
they are not custom views.
These are AutoComplete EditText with styling.
For other types of view, it works well but not for AutoComplete
 
Upvote 0
Top