Android: how to set the height/width of the src image of a ImageButton?
问题 Android: how to set the height/width of the image(src image intead of the background) of a ImageButton? I want to set the height/width of the top level image(not the background) image, the size of image should be customized instead of fullfill the button automatically 回答1: You can just Use the scaleType attribute of ImageButton . Set it to fitXY or fitCenter or anything else according to your need. like this <ImageButton android:id="@+id/imageButton" android:layout_width="100dp" android