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

Replace Synthetic Accessors with ViewBinding #14845

Closed
15 tasks done
zwarm opened this issue Jun 15, 2021 · 3 comments
Closed
15 tasks done

Replace Synthetic Accessors with ViewBinding #14845

zwarm opened this issue Jun 15, 2021 · 3 comments
Assignees
Milestone

Comments

@zwarm
Copy link
Contributor

zwarm commented Jun 15, 2021

Tasks

Notes

  • Use with pattern as first choice, if situation calls for field, then use private var lateinit pattern
@ParaskP7
Copy link
Contributor

👋 @zwarm !

Ensure binding = null is called after super.onDestroyView() when bindings are used in fragments with property access

Should we add a separate task to fix all occurrences of that as well?

@zwarm
Copy link
Contributor Author

zwarm commented Jun 17, 2021

Should we add a separate task to fix all occurrences of that as well?

Yes, I moved the line out of notes and into tasks. 👍

@ParaskP7
Copy link
Contributor

The last PR was merged to develop just now. As such, this parent issue is now complete and can be closed. 🍾

ParaskP7 added a commit to wordpress-mobile/WordPress-FluxC-Android that referenced this issue Jul 11, 2023
Release Notes: https://github.com/JetBrains/kotlin/releases/tag/v1.6.20

------------------------------------------------------------------------

This is a tmp solution which will be removed once the 'Catalog' related
Automattic/android-dependency-catalog#20 PR
gets ready for review and the CI is able to publish the new catalog.

------------------------------------------------------------------------

FYI: Instead of updating Kotlin to this newer '1.6.20' patch version, a
better alternative would have been to replace the deprecated
'kotlin-android-extensions' plugin with 'kotlin-parcelize'. However,
doing such a migration is not trivial and will require a lot of work.
For instance, one could search for all the 'kotlinx.android.synthetic'
and 'kotlinx.android.parcel' related imports. Those would need to be
replaced with 'ViewBinding' and 'kotlinx.parcelize' respectively.

As a reference see WPAndroid such issues and their multiple PRs:
- Replace Synthetic Accessors with ViewBinding #14845
wordpress-mobile/WordPress-Android#14845
- ViewBinding: Remove Kotlin Android Extensions (Replace with Kotlin
Parcelize) #14902
wordpress-mobile/WordPress-Android#14902
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants