Linear Layout(Horizontal) in Android

android program:
Linear Layout (Horizontal) in Android UI


open project >res>layout>main.xml and edit as below
















<?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="horizontal"
    >
 
      <TextView
          android:text="red"
          android:background="#aa0000"
          android:layout_width="105px"
          android:layout_height="fill_parent"
       
          />
      <TextView
          android:background="#00aa00"
          android:text="green"
          android:layout_width="95px"
          android:layout_height="450px"
          />
          <TextView
          android:layout_width="85px"
          android:layout_height="350px"
          android:text="yellow"
          android:background="#ffff00"
          />
          <TextView
          android:layout_width="75px"
          android:layout_height="250px"
          android:text="light yellow"
          android:background="#aaaa00"
          />
           
</LinearLayout>





OUT PUT:






Comments

Popular posts from this blog

MVC Adding 2 Numbers Program

Relative Layout in android UI Design

Button Clicking -Perform Action in android