My huge counter: http://i.stack.imgur.com/zNxdX.jpg
As you can see in the picture, my counter is too huge. I can't seem to find the problem. Here is the code:
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);
what am I doing wrong?
source share