Skip to content

Instantly share code, notes, and snippets.

@lawloretienne
Created October 9, 2015 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lawloretienne/adafc681de12dec196e0 to your computer and use it in GitHub Desktop.
Save lawloretienne/adafc681de12dec196e0 to your computer and use it in GitHub Desktop.
public class CustomViewGroup extends FrameLayout {
@Override
public boolean dispatchKeyEventPreIme(KeyEvent event) {
Timber.d("");
if(event != null){
int keyCode = event.getKeyCode();
if(keyCode == KeyEvent.KEYCODE_BACK){
// hide search suggestions UI
}
}
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment