diff --git a/app/src/main/java/com/dymos/vitabrowser/MainActivity.java b/app/src/main/java/com/dymos/vitabrowser/MainActivity.java index f90dc17..46756df 100755 --- a/app/src/main/java/com/dymos/vitabrowser/MainActivity.java +++ b/app/src/main/java/com/dymos/vitabrowser/MainActivity.java @@ -338,21 +338,12 @@ public void nextView(int num){ }else { panelViews[row][column].setBackground(ContextCompat.getDrawable(MainActivity.this, R.drawable.button_focus_background)); } - /*if(row == 0 && column == 0){ - searchView.performClick(); - }*/ } public void dialogEvent(int keyCode){ - Log.e("dialogE","dialogEvent"); - //mousePointer.setVisibility(View.GONE); + //mousePointer.setVisibility(View.GONE); switch (keyCode){ case KeyEvent.KEYCODE_BACK: Log.e("current focus",""+getCurrentFocus()); - focusTemp = getCurrentFocus(); - if(focusTemp != null){ - focusTemp.requestFocus(); - } - dialogBack.setVisibility(View.GONE); break; case KeyEvent.KEYCODE_DPAD_UP: @@ -420,7 +411,7 @@ public boolean dispatchKeyEvent(KeyEvent event) { keyCode = event.getKeyCode(); if(dialogBack.getVisibility() == View.VISIBLE && event.getAction() != KeyEvent.ACTION_UP){ dialogEvent(keyCode); - }else{ + }else{//Dialog not visible if (event.getAction() == KeyEvent.ACTION_UP){ if(pointerMoveTimer != null) { pointerMoveTimer.cancel(); @@ -465,13 +456,12 @@ public final void onFinish() { MotionEvent.ACTION_UP, x, y, 0)); break; case KeyEvent.KEYCODE_BACK: + if(webClient.isFullScreen()){ webClient.onHideCustomView(); }else{ dialogBack.setVisibility(View.VISIBLE); - if(focusTemp != null) { - focusTemp.requestFocus(); - } + panelViews[row][column].requestFocus(); } break; }