0

I have an editText (Input type : only numbers) and I already know how show always the keyboard.

I'm currently using this coded in my manifest :

android:windowSoftInputMode="adjustResize"

But how can I show always**(everytime that the activity starts)** the numpad instead the keyboard ?

  • you mean : show editext with input type is numpad ? – Danh DC Jan 29 '16 at 02:11
  • Hello, my code already show this : http://i.imgur.com/hWvGqVU.png and I want to my code show always this : http://i.imgur.com/4ILQMGB.png (Everytime when I start the activity) –  Jan 29 '16 at 02:13
  • I added this : "Show numpad everytime that the activity starts" –  Jan 29 '16 at 02:26
  • to show number pad set ``android:inputType="number"`` and ``android:focusable="true"`` for EditText – Danh DC Jan 29 '16 at 02:53
  • @DanhDC I did that but number pad doesn't start automatically when activity starts. –  Jan 29 '16 at 03:02
  • Are you try set focusable for EditText in Activity ? E.g : after your activity loaded, use ``editText.requestFocus();`` – Danh DC Jan 29 '16 at 03:05

2 Answers2

2

In your manifest file, try adding the following to the <activity> that you want to show the keyboard when the activity starts:

android:windowSoftInputMode="stateVisible"

For more options, checkout the document

Danh DC
  • 1,246
  • 7
  • 17
0

First, add this line to your mainfest

android:windowSoftInputMode="adjustResize|stateAlwaysVisible"

then in xml set the inputtype as

android:inputType="numberSigned"

it's work for me , hope you get help

and must set at that view