Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMiika Vuorio
8,018 PointsHow do I convert this "@dimen/activity_vertical_margin" back into this "50dp"
In android studios designer xml part I had a padding around my relative layout of 50dp, but then I clicked the 50dp and it changed into this @dimen/activity_vertical_margin. How do I change it back into 50dp. It doesn't affect the app in any way it's just bothering me.
android:paddingTop="@dimen/activity_vertical_margin"
1 Answer
Kourosh Raeen
23,733 PointsThat's just a convenience provided by Android Studio so that you can see what the value is without having to open the dimens.xml file in the values folder. So the code is infact:
android:paddingTop="@dimen/activity_vertical_margin"
Android studio just magically shows 50dp instead. If you just close and reopen the file it will go back to showing 50dp.
Miika Vuorio
8,018 PointsMiika Vuorio
8,018 PointsThanks!