Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating a project in eclipse

Posted on 2013-10-28
4
Medium Priority
?
554 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 2000 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Ransomware, the malware that locks down its victim’s files until they pay up, has always been a frustrating issue to deal with. However, a recent mobile ransomware will make the issue a little more personal… by sharing the victim’s mobile browsing h…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…
Suggested Courses

916 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