I don’t want to specify hard coded test size values in my layout.xml, hence i am using the following specification :
android:layout_height="@integer/intervalViewHt"
and
@integer/intervalViewHt value is as follows:
<integer name="medium">15</integer>
Now, the while inflating android is creating a problem saying that it cannot inflate the view. I want to actually specify value in dp so the actual value should be like
android:layout_height="15dp"
Can anyone help me here ?
What you’re looking for are “dimensions” rather than plain integers.
Declaration:
Usage:
Have a look at the given link for more examples in the Android docs.