参考内容:
http://www.chinaoc.com.cn/p/1147208.html如何在Android中限制Spinner下拉视图的高度
//内容适配器
spinner.setAdapter(serviceCenterAdapter);
//弹出下拉框背景图片,是.9.png格式的。
spinner.setPopupBackgroundResource(R.drawable.spinner_bg);
//弹出下拉框水平偏移量 spinner.setDropDownWidth(dip2px(ServiceMallActivity.this,150));
//弹出下拉框垂直偏移量 spinner.setDropDownVerticalOffset(dip2px(ServiceMallActivity.this,10));
//弹出下拉框高度
try {
Field popup = Spinner.class.getDeclaredField("mPopup");
popup.setAccessible(true);
// Get private mPopup member variable and try cast to ListPopupWindow
android.widget.ListPopupWindow popupWindow = (android.widget.ListPopupWindow) popup.get(spinner);
// Set popupWindow height to