Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Numeric Keypad
    primarykey
    data
    text
    <p>I've got my app working, but can't get the keypad to only show numeric keys (including decimals). I'm using phonegap, so I don't know if that's what's causing the issue, but I've tried adding:</p> <pre><code>&lt;EditText android:numeric="decimal" /&gt; </code></pre> <p>into both my AndroidManifest.xml and the activity_main.xml but no luck. </p> <p>I'm thinking I need to change something inside phonegap, because my activity_main.xml only shows the hello world string and not the other components of my app.</p> <p><strong>EDIT</strong></p> <p>Here's the "activity_main.xml"</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="@string/hello_world" tools:context=".MainActivity" /&gt; &lt;EditText android:inputType="number"&gt; &lt;/EditText&gt; &lt;/RelativeLayout&gt; </code></pre> <p>And now here's the AndroidManifest.xml</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yourappname.yourappname" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /&gt; &lt;supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizeable="true" android:anyDensity="true" /&gt; &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;EditText android:inputType="phone" android:numeric="decimal"&gt;&lt;/EditText&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:name=".MainActivity" android:label="@string/title_activity_main" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre>
    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