Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 修改输入类型:number | phone Android Studio_Java_Android_Android Layout_Android Inputtype - Fatal编程技术网

Java 修改输入类型:number | phone Android Studio

Java 修改输入类型:number | phone Android Studio,java,android,android-layout,android-inputtype,Java,Android,Android Layout,Android Inputtype,是否可以在android studio中修改inputType:Phone? 获取其他图标的#*键并提交会很方便。现在提交的唯一方法是按下手机上的“后退”按钮,退出输入键盘 在EditText xml中添加这两行 <EditText android:imeOptions="actionGo" android:inputType="number"/> //the action button of keyboard will change to go button “是否可以在a

是否可以在android studio中修改inputType:Phone?
获取其他图标的#*键并提交会很方便。现在提交的唯一方法是按下手机上的“后退”按钮,退出输入键盘

在EditText xml中添加这两行

<EditText 
 android:imeOptions="actionGo"
 android:inputType="number"/>
//the action button of keyboard will change to go button

“是否可以在android studio中以某种方式修改inputType:Phone?”--否。“现在提交的唯一方法是按下手机上的“后退”按钮以退出输入键盘”--以及控制IME操作按钮(通常位于右下角)的相关属性。
edittext.setOnEditorActionListener(new OnEditorActionListener() { 
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_GO) {
        Log.i(TAG,"Here you can perform actions");   //like btn.performClick();
        return true;
    }    
    return false;
}
});