Android 无法控制复合视图中的焦点流

Android 无法控制复合视图中的焦点流,android,focus,Android,Focus,晚上好(来自瑞典)!我正在基于两个复合视图(一个包含一个或多个视图的扩展布局)构建GUI,但我似乎无法按顺序获得焦点流。我主要想让键盘上的“下一步”按钮正常工作。当前按它除了播放咔嗒声外,什么也不做。我试过: android:nextFocusRight="@+id/ipDecimal" android:nextFocusDown="@+id/ipDecimal" 和设置(这里和那里) 我做错了什么?我当前的目标是让焦点从第一个整数流到第二个整数流 以下是我目前正在尝试使用的两个组件的布局(它

晚上好(来自瑞典)!我正在基于两个复合视图(一个包含一个或多个视图的扩展布局)构建GUI,但我似乎无法按顺序获得焦点流。我主要想让键盘上的“下一步”按钮正常工作。当前按它除了播放咔嗒声外,什么也不做。我试过:

android:nextFocusRight="@+id/ipDecimal"
android:nextFocusDown="@+id/ipDecimal"
和设置(这里和那里)

我做错了什么?我当前的目标是让焦点从第一个整数流到第二个整数流

以下是我目前正在尝试使用的两个组件的布局(它们都由扩展框架布局组成):



在尝试不同的修复程序(如将焦点转移到正确视图的不可见编辑文本)后,经历了数小时的挫折

如果发现我可以通过键盘上的“下一步”按钮获得所需的结果

这是通过OnEditorActionListener完成的

android:focusable="true"
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:custom="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:focusable="true" >

<com.SverkerSbrg.Spendo.Graphics.InsertTransaction.IntegerPicker
    android:id="@+id/ipInteger"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"
    custom:NumberSize="40"
    custom:TextAlignRight="true"
    android:focusable="true"
    custom:maxNrOfDigits="3"
    android:nextFocusRight="@+id/ipDecimal"
    android:nextFocusDown="@+id/ipDecimal">
    <requestFocus />
</com.SverkerSbrg.Spendo.Graphics.InsertTransaction.IntegerPicker>

<TextView
    android:id="@+id/tvDot"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"
    android:text="."
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textSize="30sp"
    tools:ignore="HardcodedText" />

<com.SverkerSbrg.Spendo.Graphics.InsertTransaction.IntegerPicker
    android:id="@+id/ipDecimal"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"
    android:focusable="true"
    custom:NumberSize="20"
    custom:TextAlignRight="false"
    custom:maxNrOfDigits="2" >
</com.SverkerSbrg.Spendo.Graphics.InsertTransaction.IntegerPicker>

<TextView
    android:id="@+id/tvSpace"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|center_horizontal"/>

<com.SverkerSbrg.Spendo.Graphics.InsertTransaction.CurrencyPicker
    android:id="@+id/icCurrency"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    custom:textSize="20"
    android:layout_gravity="bottom|center_horizontal">
</com.SverkerSbrg.Spendo.Graphics.InsertTransaction.CurrencyPicker>

</merge>
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
 >

<EditText
    android:id="@+id/etInteger"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:inputType="number"
    android:background="#00000000"
    android:selectAllOnFocus="true"
    android:focusable="true"
    android:hint="00">
</EditText>
</merge>