Style on AutoCompleteTextView dropdown

点点圈 提交于 2019-12-03 17:33:06

Found out myself 5 minutes after putting the question here. I'll keep the question up for someone who might come across this.

You can simply put dropdown attributes when you create the autocompletetextview.

android:dropDownWidth="yourWidth"

Coudln't find any xml attribute for setting dropdown backgroundresource but the programmatical way works fine:

autoTextView.setDropDownBackgroundDrawable(this.getResources().getDrawable(R.drawable.rounded_rectangle));

This way you can define how the dropdown should look with your own drawable. If you would want to change it with xml from resource, this is an approach:

android:completionHintView="@layout/your_layout"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!