Solved

Creating a project in eclipse

Posted on 2013-10-28
4
537 Views
Last Modified: 2013-10-29
I am creating a simple UI that stacks some text view in the new project folder that I called(LinearLayouts) that I created., from the example from the book,
 my main.xml file should have the main xml tags as : <linearLayout... .....  </linearLayout>

but my project main.xml file that i created has the  beginning tags as: <RelativeLayout......</RealativeLAyout>

Why is that?, from the book  I  named the project name as "LinearLayouts" but that is not what is showing in the main.xml file
0
Comment
Question by:imagekrazy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Expert Comment

by:Chris Harte
ID: 39606037
When you create a new xml file from the file menu

File->New->Android XML file

you choose the resource type from the dropdown menu, a layout in this case.
The Root Element is then selected, this is where you make the layout LinearLayout or RelativeLayout.

It sounds to me like you are using some defaults. Either way, you can change it by changing the tags from one to the other.
0
 

Author Comment

by:imagekrazy
ID: 39606324
Well I am not creating a new XML file,I am creating a new project in eclipse, and this is what i do ,
 I open eclipse  to start a new project ,I click New-->Android Application Project,  the application box came up where I put in the project name, application name and package name,
so I am not understanding why its not opening the way  I layout the project in the application box.
0
 
LVL 17

Accepted Solution

by:
Chris Harte earned 500 total points
ID: 39608357
It looks like eclipse is defaulting to relative layout. Just because you name a project activity LinearLayout does not mean eclipse knows that you want a LinearLayout in your xml, you still have to manually edit it.
0
 

Author Closing Comment

by:imagekrazy
ID: 39608548
thank you
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wild fly 8 startup error 2 82
Android  Galaxy Tab A Camera Setting 1 37
What is the new whtasapp feature 2 79
Java ArrayList and if statement 2 55
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question