How to set height and width of compound drawable textview in xml? [closed]
You can try something like:
<?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" ><TextView android:id="@+id/Home" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_centerHorizontal="true" android:gravity="center" android:text="Something" android:textColor="#FFFFFF" /><ImageView android:src="@drawable/icon" android:layout_width="50dp" android:layout_height="50dp" android:layout_toLeftOf="@id/Home"/></RelativeLayout>
This way I think you would have more control of your image. Hope that helps.
try setting to android:width="50dip"
and see what you get. dip is device independent pixels. You should be able to see in eclipse in design view. You cannot just set to "300"