Advertisement
Guest User

Untitled

a guest
May 26th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. componentDidMount() {
  2. this.keyboardDidShow = Keyboard.addListener(
  3. 'keyboardDidShow',
  4. this.keyboardDidShow
  5. );
  6. this.keyboardWillShow = Keyboard.addListener(
  7. 'keyboardWillShow',
  8. this.keyboardWillShow
  9. );
  10. this.keyboardWillHide = Keyboard.addListener(
  11. 'keyboardWillHide',
  12. this.keyboardWillHide
  13. );
  14. }
  15. keyboardDidShow = () => {
  16. this.setState({ searchBarFocused: true });
  17. };
  18. keyboardWillShow = () => {
  19. this.setState({ searchBarFocused: true });
  20. };
  21. keyboardWillHide = () => {
  22. this.setState({ searchBarFocused: false });
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement