修改Handler 在 ondestroy时 remove全部消息,Context获取的Manager,改为Application Context持有,游戏列表增加开服信息
This commit is contained in:
@ -146,7 +146,7 @@ public class VoteActivity extends BaseActivity {
|
||||
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
InputMethodManager imm = (InputMethodManager) VoteActivity.this.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
InputMethodManager imm = (InputMethodManager) getApplicationContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(input.getWindowToken(), 0);
|
||||
}
|
||||
});
|
||||
@ -163,7 +163,7 @@ public class VoteActivity extends BaseActivity {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
InputMethodManager imm = (InputMethodManager) VoteActivity.this
|
||||
InputMethodManager imm = (InputMethodManager) getApplicationContext()
|
||||
.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(input, InputMethodManager.SHOW_FORCED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user