v0.7.4c: fixed keyboard not hiding correctly when text input is closed
This commit is contained in:
parent
8b4b241f8a
commit
406ed4c6ca
|
@ -36,6 +36,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||
import com.badlogic.gdx.backends.android.AndroidGraphics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
|
@ -204,7 +205,7 @@ public class WndTextInput extends Window {
|
|||
((ViewGroup) textInput.getParent()).removeView(textInput);
|
||||
|
||||
InputMethodManager imm = (InputMethodManager)((AndroidApplication)Gdx.app).getSystemService(Activity.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(textInput.getWindowToken(), 0);
|
||||
imm.hideSoftInputFromWindow(((AndroidGraphics)Gdx.app.getGraphics()).getView().getWindowToken(), 0);
|
||||
|
||||
//Soft keyboard sometimes triggers software buttons, so make sure to reassert immersive
|
||||
ShatteredPixelDungeon.updateSystemUI();
|
||||
|
|
Loading…
Reference in New Issue
Block a user