Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Commit 2d6859e

Browse files
nitish1211timabbott
authored andcommitted
Close Soft Keyboard if it opens on activity recreation.
Fixes #325.
1 parent 420bd0b commit 2d6859e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/src/main/java/com/zulip/android/activities/ZulipActivity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import android.view.MenuItem;
5757
import android.view.View;
5858
import android.view.ViewPropertyAnimator;
59+
import android.view.WindowManager;
5960
import android.view.animation.Interpolator;
6061
import android.view.inputmethod.InputMethodManager;
6162
import android.widget.AdapterView;
@@ -555,6 +556,8 @@ public Cursor runQuery(CharSequence charSequence) {
555556
handleOnFragmentChange();
556557
calendar = Calendar.getInstance();
557558
setupSnackBar();
559+
//Hides Keyboard if it was open with focus on an editText before restart of the activity
560+
this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
558561
}
559562

560563
/**

0 commit comments

Comments
 (0)