Skip to content

Instantly share code, notes, and snippets.

@RedLann

RedLann/HomeContainer.java Secret

Last active Feb 20, 2020
Embed
What would you like to do?
@Override
public View focusSearch(View focused, int direction) {
switch (direction) {
case FOCUS_DOWN:
if (mContainer.hasFocus())
return focused;
else if (mTopMenu.hasFocus()) {
mLastFocused = mContainer;
return mContainer;
} else
return null;
case FOCUS_UP:
if (mContainer.hasFocus()) {
mLastFocused = mTopMenu;
return mTopMenu;
}
return null;
case FOCUS_RIGHT:
case FOCUS_LEFT:
return focused;
default:
return super.focusSearch(focused, direction);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.