Hide Tab Switcher onBackPressed

This commit is contained in:
Sonu Sourav 2019-03-05 12:50:44 +05:30 committed by Isaac Hutt
parent 06894bc63a
commit 16ecfbb676

View File

@ -1139,7 +1139,10 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
if (event.getAction() == KeyEvent.ACTION_DOWN) {
switch (keyCode) {
case KeyEvent.KEYCODE_BACK:
if (getCurrentWebView().canGoBack()) {
if (tabSwitcherRoot.getVisibility() == View.VISIBLE) {
selectTab(currentWebViewIndex);
hideTabSwitcher();
} else if (getCurrentWebView().canGoBack()) {
getCurrentWebView().goBack();
} else if (isFullscreenOpened) {
closeFullScreen();