开发者

Android Spinner with no selected text - arrow only

开发者 https://www.devze.com 2023-01-14 19:59 出处:网络
I would like to create a spinner which only displays the drop-down arrow and not the selected value and is only the width of the arrow. You can see various examples of this in Android itself e.g. Sett

I would like to create a spinner which only displays the drop-down arrow and not the selected value and is only the width of the arrow. You can see various examples of this in Android itself e.g. Settings->Display->Brightness (Edit: a commenter has pointed out that this is a DialogPreference, but I would like a similar effect using a spinner).

I have attached to the setOnItemSelecte开发者_StackOverflow社区dListener event and set the selected text to null, but this does not decrease the width of the spinner and you can can briefly see the selected text flicker before it is set to null.

How can I do this with the spinner? Is the spinner the correct control to be using in the first place?

Thanks.

0

精彩评论

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

关注公众号