mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Workaround for gamepads being taken as full fledged keyboards
This commit is contained in:
parent
f454a6edbe
commit
25741b2873
@ -9,6 +9,7 @@ import android.content.res.Configuration;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@ -101,7 +102,8 @@ public class TouchCharInput extends androidx.appcompat.widget.AppCompatEditText
|
||||
public boolean switchKeyboardState(){
|
||||
//If an hard keyboard is present, never trigger the soft one
|
||||
if(hasFocus()
|
||||
|| getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY){
|
||||
|| (getResources().getConfiguration().keyboard == Configuration.KEYBOARD_QWERTY
|
||||
&& getResources().getConfiguration().hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_YES)){
|
||||
clear();
|
||||
disable();
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user