开发者

Android autocompletetextview dropdown box's elements have a large font

开发者 https://www.devze.com 2023-02-25 06:33 出处:网络
I would like to change the autocomplete dropdown boxes element size to something smaller. Any chang开发者_StackOverflow社区e i do with textview.settextsize affects only the value in the fieldbox and n

I would like to change the autocomplete dropdown boxes element size to something smaller. Any chang开发者_StackOverflow社区e i do with textview.settextsize affects only the value in the fieldbox and not in the drop down box!

Android autocompletetextview dropdown box's elements have a large font

I am adding the list items dynamically and my adapter is set to the resource

adapterForFromAutoText.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);

Should i add my own resource to customize the style of the font, if so does it matter that i use adapterForFromAutoText.add(displayName); to dynamically add data through the adapter.


Do you have the attribute "android:textSize" within your "android.R.layout.simple_dropdown_item_1line"? You may want to try to change the textSize there.

You may also want to check out this tutorial.


Use This Layout , It will change the autocomplete dropdown boxes element size to smaller

ArrayAdapter<String> adapter = new ArrayAdapter<String>(
            this, android.R.layout.simple_spinner_item, aList);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号