Tuesday, February 18, 2014

Viewing XML layout attributes.

<?xml version=”1.0” encoding=”utf-8”?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”
            android:orientation=”vertical”
            android:layout_width=”fill_parent”
            android:layout_height=”fill_parent” >
</LinearLayout>

xmlns:android=” ”


This defines the XML namespace that you will use to reference part of the Android SDK.

orientation=”vertical”


This informs Android that this view is to be laid out in a vertical fashion (like portrait format in printing).

android:layout_width=”fill_parent”


This informs the view that it should fill as much horizontal space as it can, up to its parent. In short, it should make the width as wide as it can be within the parent.

android:layout_height=”fill_parent”


This informs the view that it should fill as much vertical space as it can, up to its parent. In short, it should make the height as tall as it can be within the parent.

No comments:

Post a Comment