Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(utils): dismissKeyboard, copyToClipboard, setWindowBackgroundColor, getCurrentActivity and getResource #10089

Merged
merged 10 commits into from Nov 18, 2022

Conversation

NathanWalker
Copy link
Contributor

PR Checklist

What is the current behavior?

Various commonly needed utilities required developers to create themselves.

What is the new behavior?

New convenient utilities have been added:

  • Utils.dismissKeyboard(): dismiss any visible keyboard
  • Utils.copyToClipboard(value): copy any string value to device clipboard
  • Utils.ios.setWindowBackgroundColor('blue'): iOS set window background (shown behind modals)
  • Utils.android.getCurrentActivity(): get current activity - previously would often check foregroundActivity and startActivity - this fallbacks automatically
  • Utils.android.getResource(name, type?): get an android resource by it's name with optional explicit type. This also uses the explicit package name unlike getId.

@cla-bot cla-bot bot added the cla: yes label Nov 12, 2022
@NathanWalker NathanWalker added this to the 8.4 milestone Nov 12, 2022
@NathanWalker NathanWalker merged commit 2e1d2c1 into main Nov 18, 2022
@NathanWalker NathanWalker deleted the feat/utils-extras branch November 18, 2022 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants