Note that there are some explanatory texts on larger screens.

plurals
  1. POVerify if EditText is at visible positon in screen
    primarykey
    data
    text
    <p>This problem I am going to introduce, only happen in Android 4.0 +<br> I have a LinearLayout with 4 TableLayout, it's parent is a ScrollView. I add TableRows dynamically into each TableLayout.</p> <p>My TableRows are like this.</p> <pre><code>&lt;TableRow xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tableRow1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/borda" android:layout_margin="10dip" android:paddingLeft="10dip" &gt; &lt;LinearLayout android:id="@+id/l1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginTop="15dip" android:layout_marginBottom="15dip" &gt; &lt;TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/nome" android:textStyle="bold" android:textColor="#526691" android:textSize="15sp" android:paddingLeft="10dip" android:paddingRight="5dip" /&gt; &lt;EditText android:id="@+id/valorLabel" android:layout_width="140dip" android:layout_height="wrap_content" android:textSize="15sp" android:background="#ffffffff" android:singleLine="true" android:inputType="textCapSentences" android:textColor="#777777" /&gt; &lt;/LinearLayout&gt; &lt;/TableRow&gt; </code></pre> <p>It seems to have a problem when the focused EditText is scrolled to out of the screen.</p> <p><strong>Question</strong> <em>How can I know if the EditText is visible in the screen? Is there a way of remove focus in the EditText if it's parent is scrolled?</em></p> <p>Second Question <br> <strong>Why my TableRow's background get white when EditText is focused ?</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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