feat: Generate View Binding classes for layouts#1376
Merged
PranavPurwar merged 10 commits intomainfrom Nov 23, 2024
Merged
Conversation
Collaborator
|
Why did you create a new PR? |
Contributor
Author
|
Because the first one was closed. |
This commit introduces a new feature that automatically generates View Binding classes for project layouts. These classes provide type-safe access to views in layout files. This improves code clarity, and reduces potential errors.
e942a02 to
32568f7
Compare
…o resolve some code generation issue
This commit modifies the LogicEditor to use the binding object instead of view IDs directly. - It changes the tag of logic blocks to the binding object's ID. - It updates the logic for adding variables to use the binding object. - It changes the way radio buttons are displayed and their tags are set, using the binding object ID.
Adds a new setting to enable ViewBinding in projects. This includes: - A new checkbox in the project settings dialog to enable or disable ViewBinding. - Automatically adding the required ViewBinding dependency when enabled. - Generating ViewBinding classes for the project's layouts. - Modifying code generation to use ViewBinding instead of findViewById when enabled. Signed-off-by: PranavPurwar <[email protected]>
Signed-off-by: PranavPurwar <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new feature that automatically generates View Binding classes for project layouts.
These classes provide type-safe access to views in layout files. This improves code clarity, and reduces potential errors.
By @PranavPurwar