I am making a form in an android app. I currently have it in a relative layout with this snippet pictured below in a table layout within the relative layout:
When a user clicks on the spinner it pops up the selections. The user can select multiple selections and as of right now once the user hits ok it displays the selected on the spinner seperated by a comma. However if the user chooses too many it will push the spinner to the right of it off the screen. I was wondering if it would be possible to make the spinners display the text downward, so each selection would be on a new line and would shrink or expand the spinner given the amount selected. Like so:
NorthEast:
| Option1 |
| Option2 |
| Option3 |
South:
| Select |
This would also modify the whole layout so if the user sel开发者_Python百科ects a lot of options in northeast it will shift the south spinner downward. Thanks!
Have you tried adding a maxWidth to your spinner?
also you can try to wrap them in a linear layout (top two in one, bot ones in another for example) and set the layout to fill parent, and set the view's to fill parent and weight 1. that will give you equal widths of the spinners and restrict their width min/max value.
精彩评论