<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="170dp"
android:background="#fff" >
<AutoCompleteTextView
android:id="@+id/location_view"
android:layout_width="150dp"
android:layout_height="35dp"
android:layout_alignLeft="@+id/category_view"
android:layout_below="@+id/category_view"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="@string/location"
android:textSize="@dimen/autocomplettextview"
/>
<AutoCompleteTextView
android:id="@+id/category_view"
android:layout_width="150dp"
android:layout_height="35dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="21dp"
android:ems="10"
android:hint="@string/category"
android:textSize="@dimen/autocomplettextview"
android:textColor="#000"
>
<requestFocus />
</AutoCompleteTextView>
<Button
android:id="@+id/getquote_button"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/getquote"
android:paddingLeft="10dp"
android:paddingRight="10dp" />
</RelativeLayout>
<include layout="@layout/First_layout"
android:visibility="visible">
</include>
<include layout="@layout/second_layout"
android:visibility="invisible"
/>
</LinearLayout>
I wanted to make the second view to visible and visibility of first view to invisible on the item selected of the autocomplete View As The User select the Item From the AutoComplete View List The Second Layout Gets Visible And The First Layout will be Invisible