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
Samiruddin Syed
3,136 PointsAndroid Eclipse Problem HELP!
The second image shows how the green dotted lines appear when placing a Plain Text field in the layout.
But in the first image, Im not able to get those Green dotted lines as I got them in the second image.
Note : The change of file names in the first and second image.
In Fragment_Main.xml, the dotted lines appear correctly but in activity_login.xml, the dotted lines do not appear.
Im having problems placing the buttons and other things when these dotted lines aren't appearing.
Please Help.
The code for the layouts are as below :
here is the XML code for "activity_login.xml"
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.syedsamiruddin.ribbit.LoginActivity"
tools:ignore="MergeRootFrame" />
and here is the code for "fragment_login.xml"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.syedsamiruddin.ribbit.LoginActivity$PlaceholderFragment" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />
</RelativeLayout>
1 Answer
Anthony H
2,515 PointsYou are using two different types of layouts, in the activity_login.xml you are using a 'FrameLayout' and in the fragment_login.xml you are using a 'RelativeLayout'. So change it to match and that should fix it.