如何改变下拉高度微调 [英] how to change the dropdown height in spinner
本文介绍了如何改变下拉高度微调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试了很多改变微调的下拉列表项的高度..但我不能得到很好的解决.. plz帮助我的家伙..
i tried a lot to change the dropdown item height of spinner.. but i couldn't get a good solution.. plz help me guys..
下面是一个code loginactivityview.xml
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
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..
推荐答案
只需添加到您的适配器。
Just add this to your adapter.
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
这篇关于如何改变下拉高度微调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文