Solved

Creating a project in eclipse

Posted on 2013-10-28
4
519 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
  • 2
  • 2
4 Comments
 
LVL 16

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 16

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now