question

Karthik avatar image
Karthik asked

Customize numberPassword keyboard

We are using an EditText with inputType="numberPassword". For this separate keyboard is coming with 5 Digit restriction.

Here is the code:

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="Enter PIN"
    android:inputType="numberPassword" />


Following are the customization we require

  1. Restrict number of digits to 4
    Tried with the following but it only restricts the length of the input, but in the UI it still shows the 5 underscores
    android:maxLength="4"

  2. Add title to the keyboard as it is present in the Parental Control in Settings [Attached a screenshot for that].

    In the amazon parental controls the title is showing as Enter Prime Video PIN. We need a way to change that title.


Similar question but asked at 2017 https://amazon.developer.forums.answerhub.com/questions/89948/password-input-length.html

fire tv
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers