开发者

Android spinner background and default text

I want to add a spinner to my android application that looks like that one in the image.

I don't want the selector to appear and I want a default text to appear on the left. I was thinking that I can put a back开发者_如何学Cground image that will contain the text, but I'm afraid that it won't be centered with the option that I will choose.

I've created functionality but with design I have big problems.

spinner -exemple http://www.media-sun.ro/spinner_exempla.jpg


I would create my own data-adapter for the Spinner by creating a new class which implements the SpinnerAdapter-interface (an example can be found here).

In your own Adapter, you can then modify the displayed Text (for example in the getView-method) and make it print out your "Option Name", too.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜