Home>
NumberPicker is set to the characters "Off" and a number between 1 and 60.
The soft keyboard when you press and hold this NumberPicker is in Japanese character input mode.
I want to set the initial display value of this soft keyboard to numeric input mode, but I don't know how.
<NumberPicker
android: id = "@ + id/np_fadeIn"
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: theme = "@ style/PickerText"
android: layout_marginLeft = "20dp"
android: layout_marginRight = "20dp"
android: layout_gravity = "center" />
// initial setting of number picker
np_fadeIn = layout.findViewById (R.id.np_fadeIn);
// Set the number picker
String [] pref;
pref = new String [61];
pref [0] = getString (R.string.off);
for (int i = 1;i<= 60;i ++) {
pref [i] = String.valueOf (i);
}
// Specify minimum and maximum array index
np_fadeIn.setMinValue (0);
np_fadeIn.setMaxValue (60);
// Set the array to numberPicker
np_fadeIn.setDisplayedValues (pref);
Supplemental information (FW/tool version etc.)
Android Studio3.4
API level 14 to 28
-
Answer # 1
Related articles
- java - a program that accepts input from the keyboard in order and ends when a specific input arrives
- how to repeat java keyboard input/output ?
- i want to make a judgment that the keyboard is pressed on javascript instead of physically
- java - i want to check which button was pressed when the dynamically added button was pressed
- [java] i want to use a numerical value obtained by keyboard input to perform an array calculation
- [java] a method of inputting array elements with the keyboard and adding character strings as many as the input values cannot
- java - the keyboard closes immediately when i click the button
Related questions
- java - i want to make a timer that can set any time
- java - i want to move an image with ontouchevent in surface view that performs multi-thread processing
- java - i want to dynamically change the color of the entire background in android studio
- java - android studio data sharing
- java - android sessiongetinstance () error [send email]
- java - i want to display a part of the database on firebase as text on the application screen
- java : How to handle toast in Android app
- java : How to change the background color in an application by touching the screen
- java : How to arrange ships in the Sea Battle game
- java : Error going to the payment page Webview Android
If you call setDisplayedValues, InputType will be set to TYPE_CLASS_TEXT at that point, so you need to change it explicitly.