我的巨大锭床工人: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);
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?