Android Basics – A quick look at the Layout File in Android Project

In the last Article you learnt about MainActivity class. Let’s look at the Layout XML file.

The Layout file is responsible for the User Interface (UI). It’s what you see when you Launch an App.

The File can have Text, Buttons and other elements. Just like a website.

Go ahead an open the content_main.xml file in the new Project. As you can see this XML file contains two primary XML tags:

1. RelativeLayout : This Element tells Android to put elements relative to each other.
2. TextView : This Element is used to display Text.

The android:text attribute in the TextView element is used to display Text. Go ahead and modify this. Save and test. In the next Video we will add a Button to this Layout file.

Author: androidsmartly

I am a Tech Enthusiast who likes to work on new Ideas. Sharing knowledge on Android, Marketing, Startups and More.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s