Hide soft keyboard after Scene close

This commit is contained in:
seven332 committed 2015-05-12 01:02:19 +08:00
1 parent 0222dcd727
commit 001baad933
1 file changed
+5
@@ -26,6 +26,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import com.hippo.util.AssertUtils;
@@ -218,7 +219,11 @@ public abstract class Scene {
protected void onCreate(@Nullable Bundle savedInstanceState) {
}
@SuppressWarnings("ConstantConditions")
protected void onDestroy() {
// Make sure soft key broad is hidden
InputMethodManager imm = (InputMethodManager) getStageActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mSceneView.getWindowToken(), 0);
}
protected void onOpen() {