这是我的自动完成布局和5个按钮。按钮中的文本是从活动类设置的。 用于使用String Array填充到自动完成im。 Buttons中的文本可以从活动中手动填充。现在这场比赛将会持续存在吗?在模拟器中,自动完成功能无法对其进行测试。
<?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>
如何shd我的活动类b,这样当我在自动填充中键入名称时,将填充包含该文本的按钮,并且所有按钮功能将继续工作..