The introduction of the Android UI Linear Layout

Linear Layout Android

You can set the display in one column or in a row, either horizontally or vertically.



The following syntax example is applied to the xml files (layout).

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

Source: Master Android (App)

Post Author: Study