Note that there are some explanatory texts on larger screens.

plurals
  1. POEditText does not accept digits as input
    text
    copied!<p>The <code>EditText</code> view with <code>id="price"</code> has an <code>inputType="numberDecimal"</code> that does not accept any digits but will only accept one decimal point. The other <code>EditText</code> view with <code>id="store"</code> has no <code>inputType</code> set but has two issues. If the view has no input then entering a digit from the keyboard doesn't do anything. The only way to have a digit be accepted is if it immediately follows either a letter or another digit. I am using the default <code>Android</code> keyboard. The layout is being inflated in the <code>onCreateView()</code> method of a subclass of <code>SherlockFragment</code>. Could this be an issue with the <code>EditText</code> view behavior inside a <code>SherlockFragment</code>? I have a similar layout that is used to inflate a subclass of 'SherlockFragmentActivity', and those <code>EditText</code> views behave normally. Does anyone know what could be causing this issue?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"&gt; &lt;TextView style="@style/ProductTextViewTitle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="10dp" android:text="Product Tile" /&gt; &lt;TableRow android:layout_width="fill_parent" android:layout_height="50dp" android:gravity="center_vertical" android:padding="5dp"&gt; &lt;TextView style="@style/ApolloStyleBold" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.4" android:gravity="center_vertical" android:paddingLeft="5dp" android:text="@string/price"/&gt; &lt;EditText android:id="@+id/price" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.6" android:background="@null" android:hint="@string/price_italic_hint" android:inputType="numberDecimal"/&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_width="fill_parent" android:layout_height="50dp" android:gravity="center_vertical" android:padding="5dp"&gt; &lt;TextView style="@style/ApolloStyleBold" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.4" android:gravity="center_vertical" android:paddingLeft="5dp" android:text="@string/store_name"/&gt; &lt;EditText android:id="@+id/store" android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="0.6" android:background="@null" android:hint="@string/stores_hint" /&gt; &lt;/TableRow&gt; &lt;/LinearLayout&gt; </code></pre> <h1>Update</h1> <p>When I tested this on Android v4.3, it has the messed up (not accepting digits as input) behavior. However, I tested it on Android v4.1.2, and it accepts digits as input. Is there something different about these two versions as far as EditText behavior?</p>
 

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