可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
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 .... />
![](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
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