适用于Android的自定义旋转对话框 [英] Custom spinner dialog for Android
问题描述
如何做一个自定义主题android spinner对话框?
How do I do a custom theme android spinner dialog?
推荐答案
这个博客有一个可能涵盖你的问题的例子:
This blog has an example that probably covers your question:
http://www.mokasocial.com/2011/03/easily-create-a-default-custom-styled-spinner-android/
编辑:
这些博客文章有一个非常相似的答案:
http://karanbalkar.com/2013/07/tutorial-39 -create-custom-spinner-in-android /
http://stephenpengilley.blogspot.no/2013/01/android-custom-spinner-tutorial.html
These blog posts has a pretty similar answer: http://karanbalkar.com/2013/07/tutorial-39-create-custom-spinner-in-android/ http://stephenpengilley.blogspot.no/2013/01/android-custom-spinner-tutorial.html
自定义的关键Android Spinner将为微调框行创建一个自定义资源将该行布局传递到自定义适配器中。在自定义适配器中,可以覆盖以下两个功能:
The key to customizing an Android Spinner is to create a custom resource for the spinner rows, and then passing that row layout into a custom adapter. In the custom adapter, one can override the following two functions:
@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将向用户展示。
To determine how the Android Spinner will look to the user.
这篇关于适用于Android的自定义旋转对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!