2013-03-28 66 views
0

微調器關閉時的佈局採用配置到微調器每一行的佈局佈局。微調器佈局關閉不同從每行的佈局

每一行的佈局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)我有利潤的頂部和底部,因爲我想給選擇之間的soem空間..但是,然後按鈕本身的微調,我的意思是,微調的佈局,同時關閉也有邊緣..它看起來比我想要的大。

可以定義不同的佈局? 我嘗試使用更低的高度在xml中使微調器佈局,但是然後我可以清楚地看到選項..因爲它有邊距。

我是否讓自己清楚? 非常感謝提前..如果有人不明白,我可以更好地解釋。 感謝;)

+0

在此處找到解決方案:http://stackoverflow.com/questions/4647299/android-spinner-with-different-layouts-for-drop-down-state-and-closed-state – TiagoM

回答