SamJ SamJ - 1 year ago 72
Android Question

Change height of items Programmatically

What I need to know

I need to know how can I change the height of any item (in this case it's a spinner).

What is my program composed of

My program is composed of a Table having table rows (which are added pragmatically).

What I want to achieve:

I want to make all items in every row of same height.

What the Program does:

Every time you press the add button a TextView , Spinner , EditText are added inside a row which is also generated.


P.S: If you know any other way (Not listed in "What I want to achieve") to achieve my goal just post it


Answer Source

My guess is that you can either change your spinner's size so that it doesn't look huge compared to the other elements (see How can I change/decrease the Android spinner size?) or change the alignment of your items (see Android View align bottom (programmatically) without XML), for example align the bottom of your spinner with your EditText's

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download