Show the soft keyboard provided by Android without a text field
for pure text input for editing the name of the savegame.
This commit is contained in:
@@ -307,6 +307,12 @@ public class MainActivity extends Activity {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
public void togglePlainAndroidSoftKeyboardInput()
|
||||
{
|
||||
InputMethodManager imm = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
|
||||
}
|
||||
|
||||
public void showScreenKeyboard(final String oldText, boolean sendBackspace)
|
||||
{
|
||||
if(Globals.CompatibilityHacksTextInputEmulatesHwKeyboard)
|
||||
|
||||
@@ -524,6 +524,21 @@ class DemoRenderer extends GLSurfaceView_SDL.Renderer
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void togglePlainAndroidSoftKeyboardInput() // Called from native code
|
||||
{
|
||||
class Callback implements Runnable
|
||||
{
|
||||
public MainActivity parent;
|
||||
public void run()
|
||||
{
|
||||
parent.togglePlainAndroidSoftKeyboardInput();
|
||||
}
|
||||
}
|
||||
Callback cb = new Callback();
|
||||
cb.parent = context;
|
||||
context.runOnUiThread(cb);
|
||||
}
|
||||
|
||||
public void showScreenKeyboard(final String oldText, int sendBackspace) // Called from native code
|
||||
{
|
||||
class Callback implements Runnable
|
||||
|
||||
Reference in New Issue
Block a user