Skip to content

[Android] Checkbox to inherit from AppCompatCheckBox#18318

Closed
vonovak wants to merge 2 commits into
react:masterfrom
vonovak:appCompatCheckbox
Closed

[Android] Checkbox to inherit from AppCompatCheckBox#18318
vonovak wants to merge 2 commits into
react:masterfrom
vonovak:appCompatCheckbox

Conversation

@vonovak

@vonovak vonovak commented Mar 10, 2018

Copy link
Copy Markdown
Contributor

Motivation

The checkbox components inherits from android.widget.CheckBox. AppCompatCheckBox offers better appearance and support for advanced features (eg. tinting) on older APIs.

However, the build fails for some reason; If somebody could shed some light on this, I'd appreciate it. Thanks for the comment, I was being blind and somehow ignored the BUCK file.

Test Plan

I have created a simple app with a checkbox.

Screenshot from android 4.1 (current master):

Screenshot after applying the change, also android 4.1:

Related PRs

#18300 (this PR is needed to support tinting on older android api levels)

Release Notes

[ANDROID] [ENHANCEMENT] [Checkbox] - Checkbox inherits from AppCompatCheckBox

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 10, 2018
@pull-bot

pull-bot commented Mar 10, 2018

Copy link
Copy Markdown
Warnings
⚠️

📋 Release Notes - This PR may have incorrectly formatted Release Notes.

Generated by 🚫 dangerJS

@janicduplessis

Copy link
Copy Markdown
Contributor

@vonovak Thanks for the PR! React Native supports BUCK on Android, this is the part of the build that fails. You will need to add the dependency to the BUCK file in the checkbox folder. You can probably have a look at another component that uses the support library to figure out what you need to add.

@vonovak
vonovak force-pushed the appCompatCheckbox branch 2 times, most recently from 2ad658f to 3d68948 Compare March 12, 2018 19:17
@vonovak
vonovak force-pushed the appCompatCheckbox branch from 3d68948 to 55b7d71 Compare March 12, 2018 20:14
@vonovak

vonovak commented Mar 13, 2018

Copy link
Copy Markdown
Contributor Author

@janicduplessis thanks for the quick response, since I'm not experienced in using buck myself, I somehow ignored the buck files. the PR should be good for merge.

@hramos hramos added Android and removed Android labels Mar 13, 2018
@janicduplessis

Copy link
Copy Markdown
Contributor

Looks good! I’ll check out your other PR too soon.

@facebook-github-bot shipit

@facebook-github-bot

Copy link
Copy Markdown
Contributor

Something went wrong executing that command, @hramos could you take a look?

@facebook-github-bot facebook-github-bot added Failed Commands Import Started This pull request has been imported. This does not imply the PR has been approved. labels Mar 14, 2018

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@janicduplessis is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added Import Failed and removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Mar 14, 2018
@facebook-github-bot

Copy link
Copy Markdown
Contributor

I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification.

@hramos

hramos commented Mar 14, 2018

Copy link
Copy Markdown
Contributor

Thanks for the contribution! It looks like I'll need to update some buck related files on our side before I can merge this. I'll add it to my task list. No further action is required on your part -- please do not add commits to this PR now that it has been approved as doing so may prevent it from getting merged.

@hramos hramos self-assigned this Mar 14, 2018
@react-native-bot react-native-bot added Android Ran Commands One of our bots successfully processed a command. labels Mar 16, 2018
@hramos

hramos commented Mar 17, 2018

Copy link
Copy Markdown
Contributor

Looked into this again, the actual error we're seeing is:

Warning: com.facebook.react.views.checkbox.ReactCheckBox: can't find referenced method 'boolean isChecked()' in program class com.facebook.react.views.checkbox.ReactCheckBox
Warning: com.facebook.react.views.checkbox.ReactCheckBoxManager: can't find referenced method 'void setOnCheckedChangeListener(android.widget.CompoundButton$OnCheckedChangeListener)' in program class com.facebook.react.views.checkbox.ReactCheckBox
Warning: com.facebook.react.views.checkbox.ReactCheckBoxManager: can't find referenced method 'void setEnabled(boolean)' in program class com.facebook.react.views.checkbox.ReactCheckBox
Warning: there were 3 unresolved references to program class members.

I need to get back to this again later.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Mar 18, 2018
@react-native-bot react-native-bot added Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. labels Mar 18, 2018
@hramos hramos added Type: Enhancement A new feature or enhancement of an existing feature. and removed 🌟Feature Request labels Mar 19, 2018
@janicduplessis

janicduplessis commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

@hramos Any update on this, could be related with the crazyness in https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/third-party/android/support/v7/appcompat-orig/BUCK. I'm not very familiar with BUCK so I can't really help here.

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jun 13, 2018

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@hramos

hramos commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

The error logs were cleared, so let's try importing again.

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@vonovak
vonovak deleted the appCompatCheckbox branch June 15, 2018 07:41
@hramos hramos added the Merged This PR has been merged. label Mar 8, 2019
@react-native-bot react-native-bot removed Import Started This pull request has been imported. This does not imply the PR has been approved. Import Failed Needs: Imported Diff Waiting on Meta labels Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Type: Enhancement A new feature or enhancement of an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants