我巨大的微調:http://i.stack.imgur.com/zNxdX.jpg我微調的尺寸太大
正如你可以在圖片中看到,我的微調是太巨大。我似乎無法找到問題。 這裏是代碼:
RelativeLayout.LayoutParams lpSpinner = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
spTest = new Spinner(this);
String[] spinnerArray={"1","2","3","4","5","6","7","8","9","10"};
ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, spinnerArray);
spTest.setAdapter(spinnerArrayAdapter);
spTest.setId(4);
lpSpinner.addRule(RelativeLayout.ALIGN_RIGHT, lblText.getId());
relative.addView(spTest, lpSpinner);
我在做什麼錯了?
謝謝你,這對我來說非常完美。 – user619569 2011-02-16 22:26:30