From 3a9b31a41f3416c309af7ccb33f0ae1336b296c4 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Wed, 27 Sep 2017 22:31:38 +0300 Subject: [PATCH] SDL: random fix to text input that does not work --- project/java/MainActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project/java/MainActivity.java b/project/java/MainActivity.java index 23775585d..528081a0a 100644 --- a/project/java/MainActivity.java +++ b/project/java/MainActivity.java @@ -842,6 +842,8 @@ public class MainActivity extends Activity } t.setText(t.getText().toString().substring(0, start) + t.getText().toString().substring(end)); t.setSelection(start); + t.setBackgroundColor(this.getResources().getColor(android.R.color.primary_text_light)); + t.setTextColor(this.getResources().getColor(android.R.color.background_light)); return true; } } @@ -868,7 +870,7 @@ public class MainActivity extends Activity screenKeyboard.setSelection(screenKeyboard.getText().length()); screenKeyboard.setOnKeyListener(new simpleKeyListener(this)); screenKeyboard.setBackgroundColor(this.getResources().getColor(android.R.color.primary_text_light)); - screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light)); // Just to be sure about gamma + screenKeyboard.setTextColor(this.getResources().getColor(android.R.color.background_light)); if( isRunningOnOUYA() && Globals.TvBorders ) screenKeyboard.setPadding(100, 100, 100, 100); // Bad bad HDMI TVs all have cropped borders _screenKeyboard = screenKeyboard;