android中的图像按钮样式

android中的图像按钮样式,android,button,Android,Button,嗨,我对android中的图像按钮选项感到困惑。我用以下xml创建了三个图像按钮 <ImageButton android:id="@+id/imageButton1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:sr

嗨,我对android中的图像按钮选项感到困惑。我用以下xml创建了三个图像按钮

<ImageButton
        android:id="@+id/imageButton1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:src="@drawable/folder_add" />

    <ImageButton
        android:id="@+id/imageButton4"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/imageButton1"
        android:layout_toLeftOf="@+id/imageButton1"
        android:src="@drawable/search" />

    <ImageButton
        android:id="@+id/imageButton2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/imageButton4"
        android:layout_toLeftOf="@+id/imageButton4"
        android:src="@drawable/advancedsettings" 
        style="?android:attr/borderlessButtonStyle" />

但是out就像按钮上有图像。。
请帮助我将图像仅显示为按钮..提前Thnx

将此标签放入您的
ImageButton

android:background="@null"

这就行了

您还可以使用透明颜色:这将解决您的问题

android:background="@android:color/transparent"

使用ImageView小部件代替ImageButton小部件。哦,是的,的确如此……亲爱的……:)