|
@@ -369,7 +369,10 @@ public class SDLActivity extends Activity {
|
|
|
break;
|
|
|
case COMMAND_TEXTEDIT_HIDE:
|
|
|
if (mTextEdit != null) {
|
|
|
- mTextEdit.setVisibility(View.GONE);
|
|
|
+ // Note: On some devices setting view to GONE creates a flicker in landscape.
|
|
|
+ // Setting the View's sizes to 0 is similar to GONE but without the flicker.
|
|
|
+ // The sizes will be set to useful values when the keyboard is shown again.
|
|
|
+ mTextEdit.setLayoutParams(new AbsoluteLayout.LayoutParams(0, 0, 0, 0));
|
|
|
|
|
|
InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
|
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
|