Android : Decreasing size of the Button

You can use a relative layout to achieve this. Check this sample code,

<RelativeLayout
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:text="TextView" />

    <Button
        android:id="@+id/button1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_toRightOf="@id/textView1"
        android:layout_alignTop="@id/textView1"
        android:layout_alignBottom="@id/textView1"
        android:text="Button" />

</RelativeLayout>

Use can take the image view in this case or if your taking text view in this case so you can take the image with proper size so that it would not bluer through these measures you can set small size for image Best way is you can take the image with that size you want to create its good way


It's been almost a year since the question was asked. But I faced the problem now and got a solution. :) May be it will help someone.

You can achieve this by setting android:minHeight="0dp" for the Button widget.

And I guess this behavior is because there is some default value (may be a 48dp) set for Button widgets by the framework considering a minimum touch area.