How can I manage the height of android spinner items? -


I have an Android spinner that uses a array adapter to populate the list of strings and it works fine, However, in the way the spinner is displayed I am running in a display height problem with the list item.

At first glance, it seems that the ArrayEdapter can use a layout to display the option which leads me to the problem. When displaying the current item in the spinner (when the user is not selecting a new item from the list) the spinner pad the text so that the spinner is a proper size to click. However, when the user brings a list to tap on it and select a new item, that list item is a short height-wise way. If I use an item layout which presents list items at a reasonable height, then the spinner itself grows awkward due to the item's own padding of the item.

How can I manage the height of these two items display the detection modes effectively so that they can show the same height values ​​rather than the height of the spinner, which is higher than the list item performance height ?

I have run myself in this issue some time ago, and it has come to me that I have a dropdown and There is a need to use different layouts for the display

I have this code:

  adapters = new simplecut adapter (this, Android R.Lite.Simple_spirit_item, CGUP , New string [] {"name", "_id"}, new int [] {android.r.id.text1}); Adapter.setDropDownViewResource (android.R.layout.simple_spinner_dropdown_item);  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -