i tried a lot to change the dropdown item height of spinner.. but i couldn't get a good solution.. plz help me guys..
here is a code loginactivityview.xml
<Spinner
android:id="@+id/spinnerFacility"
android:layout_width="400dip"
android:layout_height="50dip"
android:layout_alignLeft="@+id/lpassword"
android:layout_below="@+id/lpassword"
android:layout_marginTop="32dip"
android:background="@drawable/location"
android:paddingLeft="10dip"
android:dropDownWidth="@style/dropDown"
android:minHeight="40dip"
android:typeface="monospace" />
loginrowspinner.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/textViewRowFacility"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="left"
android:paddingBottom="5dip"
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:paddingTop="5dip"
android:text="Facility"
android:textColor="#000000"
android:textSize="20dip" >
</TextView>
how to change the height of drop down any idea..
You can try using dps.
add this in your adapter : convertView.setMinimumHeight(60); which works for me.
Maybe it can help..
In loginrowspinner.xml, add
android:minHeight="48dp"
toTextView
element.//This might also help:
As people say, best way is to add
to .xml. But if you want to do it programatically use:
being mspinner the name of your spinner and 48 the new height of the option.