So I have an ImageButton
but the image is a very big fit for it. I tried android:scaleType="center"
and it failed because the image centered but it was too small and tried fitXY
but same result.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f1e8e8"
tools:context="com.example.bassam.myapplication123.MainActivity">
<ImageButton android:id="@+id/myButton"
android:layout_width="match_parent"
android:layout_height="150dp"
android:padding="100dip"
android:background="#ffffff"
android:src="@drawable/Work"
android:scaleType="fitXY"
></ImageButton>
</RelativeLayout>