如何制作自定义主题 Android Spinner 对话框?
该博客有一个示例,可能可以解决您的问题:
http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/ http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/
Edit:
这些博客文章有一个非常相似的答案:http://karanbalkar.com/2013/07/tutorial-39-create-custom-spinner-in-android/ http://karanbalkar.com/2013/07/tutorial-39-create-custom-spinner-in-android/
http://stephenpengilley.blogspot.no/2013/01/android-custom-spinner-tutorial.html http://stephenpengilley.blogspot.no/2013/01/android-custom-spinner-tutorial.html
自定义 Android Spinner 的关键是为微调器行创建自定义资源,然后将该行布局传递到自定义适配器中。在自定义适配器中,可以重写以下两个函数:
@Override
public View getDropDownView(int position, View cnvtView, ViewGroup prnt) {
// Custom view generation
}
@Override
public View getView(int pos, View cnvtView, ViewGroup prnt) {
// Custom view generation
}
确定 Android Spinner 对用户的外观。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)