android - How can I set the width and height of an ImageView to another ImageView's width and height on the XML? -
i have layout.
<imageview android:id="@+id/icon" android:layout_gravity="left" android:layout_marginleft="5px" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/icon"/> <imageview android:id="@+id/header_avatar" android:layout_gravity="left" android:layout_marginleft="5px" android:layout_width="?????" android:layout_height="?????"/>
i want second imageview have same size of first imageview resizes pictures set in second view (header_avatar) same of first view (@drawable/icon). posible or have programmatically? cannot reference first view's width , length on second view?
thanks in advance.
using relative layouts trick. if not, programatically in oncreate method of activity.
Comments
Post a Comment