Skip to content

Commit

Permalink
Update OAuthDialogFragment.java
Browse files Browse the repository at this point in the history
修改WebView的后退按钮响应时间,避免二次触发
  • Loading branch information
lawlight authored May 17, 2018
1 parent 6e01b81 commit 38babe5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void onViewCreated(View view, Bundle savedInstanceState) {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
WebView wv = (WebView) v;
if (keyCode == KeyEvent.KEYCODE_BACK && wv.canGoBack()) {
if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP && wv.canGoBack()) {
wv.goBack();
return true;
}
Expand Down

0 comments on commit 38babe5

Please sign in to comment.