The Linear Layout Layout Manager

The LinearLayout is the most popular layout. This layout manager organizes its children either horizontally or vertically based on the value of the orientation property. Listing 4-24 shows a LinearLayout with horizontal configuration.

Listing 4-24. A LinearLayout with Horizontal Configuration

<LinearLayout xmlns:android="" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">

<!-- add children here--> </LinearLayout>

You can create a vertically oriented LinearLayout by setting the value of orientation to vertical.

0 0

Post a comment