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..
Have you tried something like
android:layout_height="30dp"
instead offill_parent
for either of those elements in loginrowspinner.xml?Override method in ArrayAdapter class
Just add this to your adapter.
Got stuck in same problem.Found following solution to be working for me:
Hope it helps someone!!!!
Thanks
Create your own textview in layout folder like this which will be populated in dropdown popup
Note I have provided
and
and use this for your spinner, like this
this works for me :)