Skip to content

feat: Generate View Binding classes for layouts#1376

Merged
PranavPurwar merged 10 commits intomainfrom
wip/viewbinding-support
Nov 23, 2024
Merged

feat: Generate View Binding classes for layouts#1376
PranavPurwar merged 10 commits intomainfrom
wip/viewbinding-support

Conversation

@hasrat-ali
Copy link
Contributor

@hasrat-ali hasrat-ali commented Nov 10, 2024

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

@ilyassesalama
Copy link
Collaborator

Why did you create a new PR?

@hasrat-ali
Copy link
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.
@hasrat-ali hasrat-ali force-pushed the wip/viewbinding-support branch from e942a02 to 32568f7 Compare November 18, 2024 10:17
PranavPurwar and others added 7 commits November 21, 2024 16:31
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]>
@PranavPurwar PranavPurwar marked this pull request as ready for review November 22, 2024 05:06
@trindadedev13 trindadedev13 added the feature A new feature label Nov 23, 2024
@PranavPurwar PranavPurwar merged commit 92cd543 into main Nov 23, 2024
@PranavPurwar PranavPurwar deleted the wip/viewbinding-support branch November 23, 2024 19:52
@PranavPurwar PranavPurwar restored the wip/viewbinding-support branch November 23, 2024 19:52
@ilyassesalama ilyassesalama deleted the wip/viewbinding-support branch November 23, 2024 21:08
@ilyassesalama ilyassesalama restored the wip/viewbinding-support branch November 23, 2024 21:08
@hasrat-ali hasrat-ali deleted the wip/viewbinding-support branch November 26, 2024 18:28
@ilyassesalama ilyassesalama added the merged This pull request was merged, it's only GitHub not showing it as merged. label Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A new feature merged This pull request was merged, it's only GitHub not showing it as merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants