例外(ex);}不会引发异常 <EditText android:id="@+id/edit" android:inputMethod="tx.android.softkeyboard.TXSoftKeyboard" andr
例外(ex);}代码>不会引发异常例外(ex);}不会引发异常 <EditText android:id="@+id/edit" android:inputMethod="tx.android.softkeyboard.TXSoftKeyboard" andr,android,android-layout,android-input-method,Android,Android Layout,Android Input Method,例外(ex);}不会引发异常 <EditText android:id="@+id/edit" android:inputMethod="tx.android.softkeyboard.TXSoftKeyboard" android:layout_width="match_parent" android:layout_height="wrap_content"/> Caused by: java.lang.ClassNotFoundException
<EditText
android:id="@+id/edit"
android:inputMethod="tx.android.softkeyboard.TXSoftKeyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Caused by: java.lang.ClassNotFoundException: tx.android.softkeyboard.TXSoftKeyboard
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:400)
at java.lang.Class.forName(Class.java:326)
at android.widget.TextView.<init>(TextView.java:1233)
at android.widget.EditText.<init>(EditText.java:64)
if (inputMethod != null) {
Class<?> c;
try {
c = Class.forName(inputMethod.toString());
} catch (ClassNotFoundException ex) {
throw new RuntimeException(ex);
}
try {
createEditorIfNeeded();
mEditor.mKeyListener = (KeyListener) c.newInstance();
} catch (InstantiationException ex) {
throw new RuntimeException(ex);
} catch (IllegalAccessException ex) {
throw new RuntimeException(ex);
}
try {
mEditor.mInputType = inputType != EditorInfo.TYPE_NULL
? inputType
: mEditor.mKeyListener.getInputType();
} catch (IncompatibleClassChangeError e) {
mEditor.mInputType = EditorInfo.TYPE_CLASS_TEXT;
}
}