ICS like spinner in previous versions of android

匿名 (未验证) 提交于 2019-12-03 10:24:21

问题:

I want to the spinner to look like as in ICS in all the previous versions of android above 2.2. Is there any project or samples you know ? I came through a project HoloEverywhere

But it contains lot of change , which makes my application huge in size. So you know any simple changes that i can use. Custom layut can help me but how can i get the ICS resource ?

回答1:

Download any support library and include in your project build path

then instead of Spinner in the xml use something like

<com.name.internal.widget.IcsSpinner .... /> 

otherwise design a custom spinner yourself. But if there are many things you want like ICS to be implemented in some lower level API better do it using support libraries.

You can get support libraries for respective APIs' at the developers site:

http://developer.android.com/tools/extras/support-library.html

or better you download it from here, which also includes ActionBarSherlock

http://actionbarsherlock.com/



回答2:

The easiest way is to set ICS style background for you spinner and for sources try to download >=API 14 source which contains images which you can use.



回答3:

I needed this also but did not wan't to use ActionBarSherlock, I'm using android support library, and also did not wan't to use list navigation mode. See full solution here https://stackoverflow.com/a/21187762/3206751



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!