Resize drawable image in TextView android
Try :
android:scaleX="0.7"
android:scaleY="0.7"
OR
Wrap your resource in a drawable that defines your desired size similar to:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:drawable="@drawable/icon"
android:width="@dimen/icon_size"
android:height="@dimen/icon_size"
/>
</layer-list >
then use it in drawable left.
there is only one solution take image view for the image and resize image but text display image right side . you used below code and i hope your issue solved..
<?xml version="1.0" encoding="utf-8"?>
<ImageView
android:id="@+id/icon"
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_person" />
<TextView
android:id="@+id/heading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:drawablePadding="5dp"
android:gravity="top"
android:padding="5dp"
android:singleLine="true"
android:text="heading"
android:textSize="20dp"
app:layout_constraintLeft_toRightOf="@+id/icon" />