Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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?