In my application i want use RelativeLayout
and for set size to this i use dimens
.
I write my XML code such as below :
<RelativeLayout
android:id="@+id/listItemAuction_productImgLay"
android:layout_width="@dimen/size120New"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginBottom="@dimen/padding5"
android:layout_marginRight="@dimen/padding5"
android:layout_marginTop="5dp">
</RelativeLayout>
Dimen size : <dimen name="size120New">120</dimen>
But when run application show me below error on Logcat
:
java.lang.RuntimeException: Binary XML file line #26: You must supply a layout_width attribute.
How can i fix it and us dimes
?