0

How can change the size of each item area . Look at the red line to understand what I mean. I use class to create the spinner and have this method which I think I can change the size to make it more large. But I don't know which attribute I should use

Image : http://store3.up-00.com/Nov12/e5Z93428.png

public View getDropDownView(int position, View convertView,
            ViewGroup parent) {
        TextView label = new TextView(context);
        label.setTextColor(Color.BLACK);

}
Iulia Barbu
  • 1,522
  • 12
  • 25

1 Answers1

0

Find the Layout Parameters of your TextView and add Up and Bottom Padding to it!! Make a new Layout with a textview inside it. You can make this TextView meet your desired design. Lets say you give an id to the textview and the id is: @+id/tvDesign. Then you can follow the code below.

An example would be:

TextView tv = new TextView(this);
tv.setLayoutParams(((TextView) findViewById(tvDesign)).getLayoutParams());
Pavlos
  • 2,183
  • 2
  • 20
  • 27