mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 09:07:48 -04:00
[Input method] Try TextView
This commit is contained in:
parent
cfc3686dda
commit
09f3ff4bef
@ -74,7 +74,7 @@ public class BaseMainActivity extends LoggableActivity {
|
||||
private DrawerLayout drawerLayout;
|
||||
private NavigationView navDrawer;
|
||||
|
||||
private CapturedEditText mKeyHandlerView;
|
||||
protected CapturedEditText mKeyHandlerView;
|
||||
|
||||
private LinearLayout contentLog;
|
||||
private TextView textLog;
|
||||
@ -200,8 +200,7 @@ public class BaseMainActivity extends LoggableActivity {
|
||||
|
||||
mKeyHandlerView = findViewById(R.id.main_key_handler);
|
||||
mKeyHandlerView.setSingleLine(false);
|
||||
mKeyHandlerView.setFocusable(false);
|
||||
mKeyHandlerView.setFocusableInTouchMode(false);
|
||||
mKeyHandlerView.clearFocus();
|
||||
|
||||
AndroidLWJGLKeycode.isBackspaceAfterChar = true; // mVersionInfo.minimumLauncherVersion >= 18;
|
||||
|
||||
@ -1021,7 +1020,7 @@ public class BaseMainActivity extends LoggableActivity {
|
||||
}
|
||||
|
||||
public void showKeyboard() {
|
||||
((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
|
||||
((InputMethodManager) getSystemService(INPUT_METHOD_SERVICE)).showSoftInput(mKeyHandlerView, InputMethodManager.SHOW_IMPLICIT);
|
||||
}
|
||||
|
||||
protected void setRightOverride(boolean val) {
|
||||
|
@ -5,7 +5,7 @@ import android.util.*;
|
||||
import android.widget.*;
|
||||
import android.view.*;
|
||||
|
||||
public class CapturedEditText extends EditText
|
||||
public class CapturedEditText extends TextView
|
||||
{
|
||||
public CapturedEditText(Context ctx) {
|
||||
this(ctx, null);
|
||||
@ -15,6 +15,11 @@ public class CapturedEditText extends EditText
|
||||
super(ctx, attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getDefaultEditable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
AndroidLWJGLKeycode.execKey(event, keyCode, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user