【发布时间】:2013-03-29 05:17:07
【问题描述】:
关闭时我的微调器的布局采用为微调器的每一行配置的布局布局。
每一行的布局是在 getCustomView 方法中定义的,因为我使用的是微调器的自定义适配器,这里是定义:
public View getCustomView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater=getLayoutInflater();
View row=inflater.inflate(R.layout.row, parent, false); //here is the layout for each row -> R.layout.row
//there are more things here but doesnt matter for the question..
}
在那个布局(row.xml)上,我有顶部和底部的边距,因为我想在选项之间留出一些空间。但是微调器的按钮本身,我的意思是,微调器的布局也在关闭时有边距。它看起来比我想要的要大。
可以定义不同的布局吗? 我尝试使用较小的高度在 xml 中制作微调器布局,但随后我可以清楚地看到该选项..因为它有边距..
我说清楚了吗? 提前非常感谢..如果有人不明白我可以解释得更好。 谢谢;)
【问题讨论】:
-
在这里找到了解决方案:stackoverflow.com/questions/4647299/…
标签: layout drop-down-menu row spinner