Loading core/java/android/view/FocusFinder.java +2 −2 Original line number Diff line number Diff line Loading @@ -574,10 +574,10 @@ public class FocusFinder { switch (direction) { case View.FOCUS_LEFT: case View.FOCUS_RIGHT: return (rect2.bottom >= rect1.top) && (rect2.top <= rect1.bottom); return (rect2.bottom > rect1.top) && (rect2.top < rect1.bottom); case View.FOCUS_UP: case View.FOCUS_DOWN: return (rect2.right >= rect1.left) && (rect2.left <= rect1.right); return (rect2.right > rect1.left) && (rect2.left < rect1.right); } throw new IllegalArgumentException("direction must be one of " + "{FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}."); Loading core/java/android/widget/TabHost.java +5 −0 Original line number Diff line number Diff line Loading @@ -146,12 +146,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); // and relays them to the tab content. mTabKeyListener = new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (KeyEvent.isModifierKey(keyCode)) { return false; } switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_DPAD_LEFT: case KeyEvent.KEYCODE_DPAD_RIGHT: case KeyEvent.KEYCODE_DPAD_UP: case KeyEvent.KEYCODE_DPAD_DOWN: case KeyEvent.KEYCODE_TAB: case KeyEvent.KEYCODE_SPACE: case KeyEvent.KEYCODE_ENTER: return false; Loading Loading
core/java/android/view/FocusFinder.java +2 −2 Original line number Diff line number Diff line Loading @@ -574,10 +574,10 @@ public class FocusFinder { switch (direction) { case View.FOCUS_LEFT: case View.FOCUS_RIGHT: return (rect2.bottom >= rect1.top) && (rect2.top <= rect1.bottom); return (rect2.bottom > rect1.top) && (rect2.top < rect1.bottom); case View.FOCUS_UP: case View.FOCUS_DOWN: return (rect2.right >= rect1.left) && (rect2.left <= rect1.right); return (rect2.right > rect1.left) && (rect2.left < rect1.right); } throw new IllegalArgumentException("direction must be one of " + "{FOCUS_UP, FOCUS_DOWN, FOCUS_LEFT, FOCUS_RIGHT}."); Loading
core/java/android/widget/TabHost.java +5 −0 Original line number Diff line number Diff line Loading @@ -146,12 +146,17 @@ mTabHost.addTab(TAB_TAG_1, "Hello, world!", "Tab 1"); // and relays them to the tab content. mTabKeyListener = new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (KeyEvent.isModifierKey(keyCode)) { return false; } switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_DPAD_LEFT: case KeyEvent.KEYCODE_DPAD_RIGHT: case KeyEvent.KEYCODE_DPAD_UP: case KeyEvent.KEYCODE_DPAD_DOWN: case KeyEvent.KEYCODE_TAB: case KeyEvent.KEYCODE_SPACE: case KeyEvent.KEYCODE_ENTER: return false; Loading