In this way, the EditText of the entire App is set.
/-----------------------Since the questioner added a description based on the question, I updated the answer as follows---------- ---------------/ Add the following code in the onCreate function of your Activity to completely disable the soft keyboard:
The global theme style used in your
AndroidManifest.xml
should look like this:Then what you need to do is, in the
AppTheme
中设置EditText
style, the complete styles.xml is as follows:In this way, the EditText of the entire App is set.
/-----------------------Since the questioner added a description based on the question, I updated the answer as follows---------- ---------------/
Add the following code in the
onCreate
function of your Activity to completely disable the soft keyboard:So, if you want it to take effect globally, you can write a base class, for example:
Then any Activity inherits it. If your project already has a base class, just insert the above code into the base class. Demo example: