1

I want to open only numeric keyboard with input type numeric password. Code is as follows.

                <EditText
                    android:id="@+id/passcode1"
                    android:layout_width="90dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_horizontal"
                    android:layout_marginTop="30dp"
                    android:cursorVisible="false"
                    android:gravity="center_vertical|center_horizontal"
                    android:imeOptions="actionNext"
                    android:inputType="numberPassword"
                    android:maxLength="4"
                    android:singleLine="true" />

Everything working great but Soft Keyboard opens with special symbols and numeric digits. I want only numeric digits must be visible there.

Thanks.

Varun Vishnoi
  • 980
  • 1
  • 9
  • 32

1 Answers1

-2

Please change
android:inputType="numberPassword"
to
android:inputType="number|textPassword"