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

[ViewBinding] Get the View type instead of XxxxBinding when using the <include /> and the layout file is in the classes (aar) #1079

Open
jun-wu-tw opened this issue Jan 20, 2023 · 1 comment

Comments

@jun-wu-tw
Copy link

jun-wu-tw commented Jan 20, 2023

We can get the matched type (TestBinding) of the <include /> if we set the id for it.

<include layout="@layout/layout_test" android:id="@+id/test" />

But I can only get the View of the <include /> when the layout file is in the classes (aar).
If we depends the module in the project, it works well with the matched type (TestBinding).

What should I do? Please help me, thank you in advance.
I think we can use findViewById to compatible with this, but that's better if we can use the ViewBinding completely.

The same question in the stackoverflow without any answer.

@jun-wu-tw jun-wu-tw changed the title [ViewBinding] Get the View type instead of XxxxBinding when using the <include /> and the layout is in the classes (aar) [ViewBinding] Get the View type instead of XxxxBinding when using the <include /> and the layout file is in the classes (aar) Jan 20, 2023
@jun-wu-tw
Copy link
Author

Could you please help me? Maybe I need to ask the question at other places. 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jun-wu-tw and others