Sig*_*igi 3 android android-layout
我有一个android xml布局,我想指定字段的焦点顺序,当用户按下键盘上的下一个.
文档说,android:nextFocusForward = TARGET_ID应该这样做.但我们所有的测试设备都忽略了它.一些运行2.3的旧设备和运行4.1的新Nexus设备.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<EditText
android:textCursorDrawable="@null"
android:id="@+id/firstname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:layout_weight="1"
android:singleLine="true"
android:background="#00000000"
android:textColor="#000"
android:nextFocusForward="@+id/lastname"
android:padding="2dp"/>
<EditText
android:textCursorDrawable="@null"
android:id="@+id/lastname"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="6dp"
android:layout_marginTop="6dp"
android:layout_weight="1"
android:background="#00000000"
android:singleLine="true"
android:textColor="#000"
android:padding="2dp"/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我在这做错了什么??? 只是想不出来.非常感谢!