2012-09-21 45 views
0

我做了自定义寻找微调项目。但之后,我意识到还有白框(周围的按钮)。在图片#2中更加明显,其中按钮图像“更短”。你们知道如何排除白色框架(不显示它们)吗?如何删除/排除微调项目框架?

主题使用:

<?xml version="1.0" encoding="utf-8"?> 
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/FrameLayout1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:layout_gravity="center"  
     android:background="@drawable/spinner_select" > 

    <TextView 
     android:id="@+id/spinnertext" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="center" /> 

    </FrameLayout> 

http://imageshack.us/photo/my-images/402/72449930.png/ enter image description here

回答

0

你可以把所有喜欢按钮:android:layout_width="fill_parent"android:orientation="vertical"RelativeLayout这样的按钮将永远是大/大,而不是依赖于它的文本。

+0

好吧,我已经改变了我的帖子above.Width不依赖于textview的宽度。 – Radiak

+0

你做了主题/按钮设计?如果是这样,请尽量让它们填满所有提供的空间。 –

+0

via getDropDownView如上所示,我为微调器创建了自定义视图:(FrameLayout w/textview)。绿色按钮是frameLayout背景。 – Radiak