Solved

Creating a project in eclipse

Posted on 2013-10-28
4
530 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 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Monitoring mobile application usage on iPhone 1 11
Application launch issue with Apache Tomcat 5 45
javap bin 2 35
RTSP blocked by AT&T? 11 40
Introduction This article is a continuation of Part-1 as evident from the title. Please visit this page (http://www.experts-exchange.com/articles/18706/Backing-up-personal-data-on-your-Android-device-Part-1.html) to read the earlier Part -1. If y…
The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

810 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