-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Fixes facebook/react-native#9777 Add support for resource-id #18514
Fixes facebook/react-native#9777 Add support for resource-id #18514
Conversation
Track react tag using android.view.View.tag. Allow developers to set resource id by setting component.testID Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. This pull request fixes the following issue. #9777 ## Test Plan First, you need to declare the resource id by creating /_your_android_studio_folder_/res/values/ids.xml ``` <?xml version="1.0" encoding="utf-8"?> <resources> <item type="id" name="my_test_id"/> </resources> ``` Second, set the testID of your component to a resource name. ``` <Button onPress={onButtonPress} title="Press Me" testID='test_id' /> ``` Third, run the app and observe the resource id using UIAutomator viewer (/Android/sdk/tools/bin/uiautomatorviewer) ## Related PRs This PR doesn't require a documentation change. ## Release Notes [ANDROID] [BUGFIX] [com/facebook/react/uimanager/BaseViewManager] - Allow developers to set resource id by setting component.testID
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
@lightboys22 can yo confirm which version of react native this has the support? |
@grabvinod Hi Vinod, I verified my changes on react native v54. |
Can you clarify where the xml file should added to? I tried to create it in /myproject/android/app/src/main/res/values but I cant see good results. |
Hi nes123, that is the correct folder. But you need to change the React Native source code in order to be able to change the Android.view.View.id |
any plans to try to merge your changes? |
I will probably wait for a long time before I merge my changes.
…On Mon, Sep 10, 2018 at 10:19 AM nes123 ***@***.***> wrote:
any plans to try to merge your changes?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18514 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEUiXpxv9F5CkBbkq9aL_-8RqF4N3MqQks5uZp8zgaJpZM4S4NcS>
.
|
Track react tag using android.view.View.tag. Allow developers to set resource id by setting component.testID
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
This pull request fixes the following issue.
#9777
Test Plan
First, you need to declare the resource id by creating /your_android_studio_folder/res/values/ids.xml
Second, set the testID of your component to a resource name.
Third, run the app and observe the resource id using UIAutomator viewer (/Android/sdk/tools/bin/uiautomatorviewer)
Related PRs
This PR doesn't require a documentation change.
Release Notes
[ANDROID] [BUGFIX] [com/facebook/react/uimanager/BaseViewManager] - Allow developers to set resource id by setting component.testID