您可以设置]分页秩序和QUOT;在XML布局?您可以、分页、布局、秩序

2023-09-12 07:55:03 作者:别再让我心动了

我已经得到了用户与拥有自己的软键盘上的Tab键片。我使用的是表视图,并有3场的EditText一排当前行下方的EditText领域。

当用户点击选项卡需要他们下一场的下方,而不是下一场的权利。

有没有办法在布局设置选项卡购物,还是只是做编程?

如果只能用Java来完成,它是如何准确地完成?

感谢您对NextFocusRight尖端,但它没'似乎工作(或我做错了什么)

如何删除流氓输入法 键盘布局里

下面是code我用。我要补充的imeoptions获得下一步按钮显示在我的模拟器。你看到什么毛病我这样做的方法是什么?

 <的EditText
机器人:ID =@ + ID / bikeHHT
机器人:layout_width =50dip
机器人:layout_height =40dip
机器人:TEXTSIZE =14px的
机器人:最大长度=2
机器人:nextFocusLeft =@ + ID / bikeMMT
机器人:imeOptions =actionNext
机器人:layout_column =1/>
<的EditText
机器人:ID =@ + ID / bikeMMT
机器人:layout_width =50dip
机器人:layout_height =40dip
机器人:TEXTSIZE =14px的
机器人:nextFocusRight =@ + ID / bikeSST
机器人:imeOptions =actionNext
机器人:最大长度=2/>
 

解决方案

替换安卓nextFocusLeft 安卓nextFocusDown 。 下一个软按钮或TAB键寻找下一个向下的重点,而不是左或右。

I've got users with tablets that have a tab key on their soft keyboard. I am using a table view and have 3 EditText Fields in one row with EditText fields below the current row.

When the user hits tab it takes them to the next field below, not the next field to the right.

Is there a way in the layout to set the tab order or is it only done programatically?

If it can only be done in Java, how exactly is it done?

Thanks for the tip on NextFocusRight but it didn' seem to work (or I did something wrong)

Here is the code I used. I have to add the imeoptions to get the "next" button to show up in my emulator. Do you see anything wrong with the way I did this?

    <EditText 
android:id="@+id/bikeHHT"
android:layout_width="50dip"
android:layout_height="40dip"
android:textSize="14px"
android:maxLength="2"
android:nextFocusLeft="@+id/bikeMMT"
android:imeOptions="actionNext"
android:layout_column="1"/>
<EditText 
android:id="@+id/bikeMMT"
android:layout_width="50dip"
android:layout_height="40dip"
android:textSize="14px"
android:nextFocusRight="@+id/bikeSST"
android:imeOptions="actionNext"
android:maxLength="2"/>

解决方案

Replace android:nextFocusLeft by android:nextFocusDown. The "next" soft button or the TAB key is looking for the next "down" focus and not left or right.