我有两种不同的主轴文档,一种是孔隙,一种是布局。 每个人都在一份情况表内有这一守则。
<LinearLayout
android:id="@+id/name_phone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/acquire"
>
<EditText
android:id="@+id/name"
android:inputType="textPersonName"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="observer name"
android:nextFocusDown="@id/phone"
android:background="@android:drawable/editbox_background"
/>
<EditText
android:id="@+id/phone"
android:inputType="phone"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="phone number"
android:nextFocusDown="@id/phone"
android:background="@android:drawable/editbox_background"
/>
</LinearLayout>
......
奇怪的是:就我所知,你不应能够提及在Xml发生的 t事件,因此,由于电话的传说,甲状腺素:nextFocusDown=“@id/phone”应当失败;这正是我的地貌Xml发生的事情,而不是在孔隙发生的事情。 在孔隙中,它完美地运作,并通过所有四个无照的EditText。 如果我把下一个焦点放在地貌上,那么它就将无法汇编成册,称“没有发现与特定名称相匹配的资源(在下一个顶点,其价值为@id/phone )。
A solution or explanation would be great. The idea is that I have four text boxes in two different LinearLayouts and whichever one has focus first will pass it to the EditText beneath it, skipping the others. I want it to work as I have it in portrait layout, when the user hits next on the name, focus moves to phone, when they hit next on that it moves to email, etc. I m also curious as to why it is letting this work in portrait but not landscape.