Skip to content

Commit a8158b7

Browse files
committed
修正登录页面崩溃问题
1 parent c8e1bf3 commit a8158b7

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

diycode-app/src/main/java/com/gcssloop/diycode/activity/LoginActivity.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,15 @@ protected void onStart() {
8787
@Override
8888
protected void onStop() {
8989
super.onStop();
90-
unRegisterKeyboardListener();
9190
EventBus.getDefault().unregister(this);
9291
}
9392

93+
@Override
94+
protected void onDestroy() {
95+
super.onDestroy();
96+
unRegisterKeyboardListener();
97+
}
98+
9499
private void registerKeyboardListener() {
95100
final View rootView = getWindow().getDecorView().findViewById(android.R.id.content);
96101
rootView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {

0 commit comments

Comments
 (0)