开发者

How to set the size of spinner

I want to know how to set the size of spinner.When i added large values to spinner list,the spinner expands and as result it pushes the labelField to the further left.

I want to know the how to 开发者_StackOverflowset the spinner size to be a constant one


Presumably, you presently have the Spinner set with android:layout_width="wrap_content". That will expand as the values expand. If that is not what you want, do something else. RelativeLayout is particularly useful here, as you can anchor both the left and right sides of the Spinners to things they should not expand past (e.g., left to another widget, right to the right edge of the screen).


Just in case anyone come to this page again... One may refer to here:

How to change spinner text size and text color?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜