I have a button which have both text and image. The image size it is taking as actual size of image. How can i change the size of image in button?
<Button
android:id="@+id/button3"
android:layout_weight="1"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:drawableTop="@drawable/home_icon"
android:text="Settings"
/>
Best Answer
Set
Also wrap_content is the preferred Parameter for width and height so that the OS will automatically adjust depending upon the screen size. Please refer to Android - Image Button Scale and Adjusting the size of an ImageButton in Android