只显示一个微调的arrowButton之上 [英] Only show the arrowbutton of a spinner

查看:182
本文介绍了只显示一个微调的arrowButton之上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一个微调,但只显示在右侧的箭头像Android这样做它的设置菜单。 (例如像通过屏幕超时)

I would like to use a spinner but only show the arrow on the right side like Android does in it's settings menu. (like for example by Screen timeout)

我可以设置宽度为+/- 65px但当时我只上了rightside圆角而左侧。

I can set the width to +/- 65px but then I've only got rounded corners on the rightside and not the left.

日Thnx您的帮助!

帕特里克

推荐答案

如果你只是想获得它的下拉菜单,将一路的权利,而不是狭窄的,你可以设置标签上的微调XML使用的android:layout_width =FILL_PARENT。如果你想只是有没有边框的按钮,Android的preferences有自己的布局对象。我刚才问别处如何让非preferances鉴于这些元素:<一href=\"http://stackoverflow.com/questions/5836132/howto-make-a-layout-similar-to-the-ones-in-settings\">Howto做类似设置的那些布局。

If you are just trying to get it the dropdown to be all the way to the right rather than narrower, you can simply set the tag on the spinner in the xml to use android:layout_width="fill_parent". If you want to just have the button without the border, the Android Preferences have their own layout objects. I have just asked at elsewhere how to get those elements in a non-preferances view: Howto make a layout similar to the ones in settings.

这篇关于只显示一个微调的arrowButton之上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆