i want use auto searching . have partially created layout . xml code. how can use autol lookup in this?
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <linearlayout android:id="@+id/imageview1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal" > <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="10dp" android:src="@drawable/logo_demo" /> </linearlayout> <linearlayout android:id="@+id/linearlayout1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/imageview1" android:layout_margintop="10dp" android:background="@drawable/flight_bar" android:orientation="horizontal" > <textview android:id="@+id/roundtriptextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="23dp" android:layout_margintop="5dp" android:layout_weight="0.01" android:text="round trip" android:textcolor="@android:color/white" /> <textview android:id="@+id/onewaytextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="23dp" android:layout_margintop="5dp" android:layout_weight="0.01" android:text="oneway" android:textcolor="@android:color/white" /> <textview android:id="@+id/multicitytextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="23dp" android:layout_margintop="5dp" android:layout_weight="0.03" android:text="multicity" android:textcolor="@android:color/white" /> </linearlayout> <linearlayout android:layout_width="fill_parent" android:id="@+id/linearlayout4" android:layout_height="wrap_content" android:layout_below="@+id/linearlayout1" android:background="@drawable/from2" android:orientation="horizontal" > <textview android:id="@+id/fromtextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="50dp" android:layout_margintop="7dp" android:layout_weight=".05" android:text="from" /> <textview android:id="@+id/totextview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginleft="50dp" android:layout_margintop="7dp" android:layout_weight=".05" android:text="to" /> </linearlayout> </relativelayout>
i have use auto box same below to have use autolook , in middle of both there image .so have done till , part not able create separate auto box below , to.
try layout.
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <imageview android:id="@+id/imageview1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margintop="10dp" android:src="@drawable/ic_launcher" /> <linearlayout android:id="@+id/linearlayout1" android:layout_width="match_parent" android:layout_height="50dp" android:layout_below="@+id/imageview1" android:layout_margintop="10dp" android:orientation="horizontal" > <textview android:id="@+id/roundtriptextview" android:layout_width="0dp" android:layout_height="match_parent" android:layout_margintop="5dp" android:layout_weight="1" android:background="#ff0000ff" android:gravity="center" android:text="round trip" android:textcolor="@android:color/white" android:textsize="20sp" /> <textview android:id="@+id/onewaytextview" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginleft="1dp" android:layout_margintop="5dp" android:layout_weight="1" android:background="#ff0000ff" android:gravity="center" android:text="oneway" android:textcolor="@android:color/white" android:textsize="20sp" /> <textview android:id="@+id/multicitytextview" android:layout_width="0dp" android:layout_height="match_parent" android:layout_marginleft="1dp" android:layout_margintop="5dp" android:layout_weight="1" android:background="#ff0000ff" android:gravity="center" android:text="multicity" android:textcolor="@android:color/white" android:textsize="20sp" /> </linearlayout> <linearlayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@+id/linearlayout1" android:orientation="horizontal" > <linearlayout android:id="@+id/linearlayout4" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:orientation="vertical" > <edittext android:id="@+id/fromtextview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margintop="7dp" android:gravity="center_horizontal" android:hint="from" /> <textview android:id="@+id/textview1" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="lon" android:textappearance="?android:attr/textappearancelarge" /> <textview android:id="@+id/textview3" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="london great britain" android:textappearance="?android:attr/textappearancemedium" /> </linearlayout> <imageview android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:background="@android:color/darker_gray" android:src="@drawable/ic_launcher" /> <linearlayout android:id="@+id/linearlayout5" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="2" android:orientation="vertical" > <edittext android:id="@+id/totextview" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margintop="7dp" android:gravity="center_horizontal" android:hint="to" /> <textview android:id="@+id/textview2" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="dxb" android:textappearance="?android:attr/textappearancelarge" /> <textview android:id="@+id/textview4" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="center_horizontal" android:text="dubai united arab emirates" android:textappearance="?android:attr/textappearancemedium" /> </linearlayout> </linearlayout> </relativelayout>
edit
put below layout after "from/to" layout.
<linearlayout android:id="@+id/linearlayout4" android:layout_width="match_parent" android:layout_height="50dp" android:layout_below="@+id/linear3" android:orientation="horizontal" > <autocompletetextview android:id="@+id/textview1" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:gravity="bottom" android:text="lon" /> <imageview android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@android:color/darker_gray" android:src="@drawable/ic_launcher" /> <autocompletetextview android:id="@+id/textview3" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="2" android:gravity="bottom" android:text="dxb" /> </linearlayout>
Comments
Post a Comment