Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi guys . i am working on an android application .
i wanted to set text size correctly for all android devices , so i decided to use dimens.xml
but unfortunately when i tried to Set text Size , i got an error
Error : No resource found that matches the given name at TextSize with value @dimens/Big

here is my dimens.xml which was defined in /res/value-hdpi/dimens.xml :

XML
<resources>
    <dimen name="Big">70sp</dimen>
</resources>




and this my Xml File :

HTML
<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Seyed Mahmud Shahrokni"
    android:textSize="@dimens/Big"
    />


any suggestion ?
Posted
Updated 13-Jan-15 2:44am
v2

1 solution

missing 's' for the value directory, should be:
/res/values-hdpi/dimens.xml

Read more: Becoming Resourceful with Android Resources[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900