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 trial

Android Build a Simple Android App Improving Our Code Dynamically Changing the Background Color

Donick Borigas
Donick Borigas
269 Points

RelativeLayout Difference

RelativeLayout Difference

  1. Ben's code is "android:paddingTop="50dp"; and mine appears "android:paddingTop="@dimen/activity_vertical_margin"

  2. When Ben added another line after "android:paddingTop="50dp", the cursor is aligned to the previous "android:", mine is tabbed.

1 Answer

Melodie 1
Melodie 1
3,931 Points

They mean the same thing , Android Studio displays the 50dp version because it's easier to read , you might have noticed that before you clicked it , it was highlighted in green, and each time you see something highlighted in green in Android Studio , it means that it's replacing some other value for better readabilty

Donick Borigas
Donick Borigas
269 Points

Hi! Appreciate your reply and help. How about when I entered a new line, mine is tabbed?