Reputation: 5830
I have the following imageButton
<ImageButton
android:id="@+id/header_buttonleft"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dip"
android:layout_marginTop="5dip"
android:src="@drawable/icon_download"
android:clickable="true"/>
But when I load my application in the device, it appears too small:
Anyone knows how can I make the icon bigger. I have tried to increase the resolution (actually the icon is 70x70) but it still doesn't work. Any idea?
Upvotes: 1
Views: 2268
Reputation: 1007584
Anyone knows how can i make the icon bigger.
Make a bigger button.
As an experiment, remove android:src
from your layout, then run your app. That is the smallest an ImageButton
can go without a custom background.
You are welcome to create your own custom ImageButton
background with custom nine-patch PNG files for the different background states, where you adjust the nine-patch control frame to allow for a smaller gap between where your icon goes and the edges of the button.
Upvotes: 2