Skip to content

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

Merged
NathanWalker merged 10 commits into
mainfrom
feat/utils-extras
Nov 18, 2022
Merged

feat(utils): dismissKeyboard, copyToClipboard, setWindowBackgroundColor, getCurrentActivity and getResource#10089
NathanWalker merged 10 commits into
mainfrom
feat/utils-extras

Conversation

@NathanWalker
Copy link
Copy Markdown
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.

2 participants