This is my Layout with autocomplete and 5 buttons. The text in the buttons is set from activity class. For populating to autocomplete im using String Array. The text in Buttons im populating manually from activity. Now would the match take and come to existance? In emulator the autocomplete is not working to test it.
<?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:background="@android:color/white"
android:gravity="center_horizontal"
android:orientation="vertical" >
<AutoCompleteTextView
android:id="@+id/autoCompleteTextView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight=".16"
android:ems="10"
android:text="Rule" >
<requestFocus />
</AutoCompleteTextView>
<LinearLayout style="@style/verticallayout" >
<LinearLayout style="@style/verticallayout" >
<Button
android:id="@+id/b1"
style="@style/buttons"
android:layout_weight=".16"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll41"
style="@style/horizontallayouthidden" >
<TextView
android:id="@+id/t1"
style="@style/textview"
android:layout_weight="0.5" />
<TextView
android:id="@+id/tt1"
style="@style/textview"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<LinearLayout style="@style/verticallayout" >
<LinearLayout style="@style/verticallayout" >
<Button
android:id="@+id/b2"
style="@style/buttons"
android:layout_weight=".16"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll42"
style="@style/horizontallayouthidden" >
<TextView
android:id="@+id/t2"
style="@style/textview"
android:layout_weight="0.5" />
<TextView
android:id="@+id/tt2"
style="@style/textview"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<LinearLayout style="@style/verticallayout" >
<LinearLayout style="@style/verticallayout" >
<Button
android:id="@+id/b3"
style="@style/buttons"
android:layout_weight=".16"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll43"
style="@style/horizontallayouthidden" >
<TextView
android:id="@+id/t3"
style="@style/textview"
android:layout_weight="0.5" />
<TextView
android:id="@+id/tt3"
style="@style/textview"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<LinearLayout style="@style/verticallayout" >
<LinearLayout style="@style/verticallayout" >
<Button
android:id="@+id/b4"
style="@style/buttons"
android:layout_weight=".16"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll44"
style="@style/horizontallayouthidden" >
<TextView
android:id="@+id/t4"
style="@style/textview"
android:layout_weight="0.5" />
<TextView
android:id="@+id/tt4"
style="@style/textview"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<LinearLayout style="@style/verticallayout" >
<LinearLayout style="@style/verticallayout" >
<Button
android:id="@+id/b5"
style="@style/buttons"
android:layout_weight=".16"/>
</LinearLayout>
<LinearLayout
android:id="@+id/ll45"
style="@style/horizontallayouthidden" >
<TextView
android:id="@+id/t5"
style="@style/textview"
android:layout_weight="0.5" />
<TextView
android:id="@+id/tt5"
style="@style/textview"
android:layout_weight="0.5" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<Button
android:id="@+id/left"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:enabled="false"
android:text="Prev" />
<Button
android:id="@+id/right"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_weight="0.5"
android:text="Next" />
</LinearLayout>
how shd my activity class b such that when i type in the name in autocomplete the button with that text be populated and all the button functionality would continue to work on..