Note that there are some explanatory texts on larger screens.

plurals
  1. POrequestFocus skipping next EditText
    text
    copied!<p>I'm having some problems with the control focusing. My interface definition below has:</p> <p>source (RadioGroup/optional) destination (EditText) quantity (EditText) transfer (Button)</p> <p>I'm changing the visibility of the "source" into my code. When the times I don't display it, focus is automatically goes to "quantity" which I would expect that to be "destination" instead. I don't know what I'm missing. I suspect it could be an Android bug, I don't know. Is there anybody know how to solve this?</p> <p>Thanks</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt; &lt;RadioGroup android:id="@+id/source" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:visibility="gone"&gt; &lt;RadioButton android:id="@+id/default" android:checked="false" android:text="@string/default"/&gt; &lt;/RadioGroup&gt; &lt;TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="1"&gt; &lt;TableRow&gt; &lt;TextView android:text="@string/destination" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" android:textColor="#ffffff" android:paddingRight="10sp" android:layout_weight="1"/&gt; &lt;EditText android:id="@+id/destination" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:singleLine="true"&gt;&lt;requestFocus/&gt;&lt;/EditText&gt; &lt;/TableRow&gt; &lt;TableRow&gt; &lt;TextView android:text="@string/quantity" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="16sp" android:textColor="#ffffff" android:paddingRight="10sp" android:layout_weight="1"/&gt; &lt;EditText android:id="@+id/quantity" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:singleLine="true"/&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;Button android:id="@+id/transfer" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/transfer"/&gt; &lt;/LinearLayout&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload