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

Java DataBinding support #7714

Open
DouglasGiovanella opened this issue Jan 17, 2023 · 3 comments
Open

Java DataBinding support #7714

DouglasGiovanella opened this issue Jan 17, 2023 · 3 comments
Assignees
Labels
Area: Bindings Issues in Java Library Binding projects. enhancement Proposed change to current functionality.

Comments

@DouglasGiovanella
Copy link

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.), Android for .NET (net6.0-android, etc.)

Affected platform version

All

Description

I had opened a feature request on the visual studio feedback site, but in 3 months i didn't receive any feedback :( (https://developercommunity.visualstudio.com/t/Support-for-binding-a-library-that-uses-/10214966)

But to be able to discuss this topic with the community, i'm opening this issue.

We use a paid security third party library that only has Android/iOS native support, but we maintain a Binding for both versions, so was not a problem so far. The problem started some time a go, because they start using DataBinding in their Android SDK, blocking us to receive any update for some time now.

Since i didn't find any workarounds for this, its a big problem for us for a security point of view.
Also, it looks like google will not drop this any time soon and more libraries will use this since there is already in stable version, blocking the use of this libraries in any xamarin project.

Relates to: #3853

Steps to Reproduce

Just try binding a android library that has databinding enabled in his build.gradle:

android {
    ...
    buildFeatures {
        dataBinding true
    }
}

Did you find any workaround?

no

Relevant log output

No response

@DouglasGiovanella DouglasGiovanella added the needs-triage Issues that need to be assigned. label Jan 17, 2023
@jpobst jpobst added enhancement Proposed change to current functionality. Area: Bindings Issues in Java Library Binding projects. and removed needs-triage Issues that need to be assigned. labels Jan 23, 2023
@jpobst jpobst added this to the Under Consideration milestone Jan 23, 2023
@jpobst
Copy link
Contributor

jpobst commented Jan 23, 2023

Supporting Java DataBinding is not currently on our roadmap.

It is rather complex to integrate into our build system, as we do not currently invoke gradle during builds. I think what would need to happen is the step that compiles the generated Java callable wrappers would need to be changed to invoke gradle instead of javac. Additionally there would need to be a mechanism to add arbitrary gradle commands to this invocation. I think there are also Java annotations that we would need to add to the JCWs.

We will continue to monitor the need for this (and other enhancements that require adding gradle to the build, potentially AndroidX.Room(?)) for future prioritization.

@jpobst jpobst changed the title Support for binding a library that uses DataBinding Java DataBinding support Jan 24, 2023
@GalaxiaGuy
Copy link

For reference, here is another thing that would benefit from gradle support:

xamarin/GooglePlayServicesComponents#172

@ziomek64
Copy link

Supporting Java DataBinding is not currently on our roadmap.

It is rather complex to integrate into our build system, as we do not currently invoke gradle during builds. I think what would need to happen is the step that compiles the generated Java callable wrappers would need to be changed to invoke gradle instead of javac. Additionally there would need to be a mechanism to add arbitrary gradle commands to this invocation. I think there are also Java annotations that we would need to add to the JCWs.

We will continue to monitor the need for this (and other enhancements that require adding gradle to the build, potentially AndroidX.Room(?)) for future prioritization.

What are the current options to have UI binded to properties in code in native Android .NET then? And I don't want to explicitly set texts, images through code each time. MVVMCross seems like an overkill for me and completely overwhelming to start using. Bindings are so much easier in MAUI using XAML and INotifyPropertyChanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Bindings Issues in Java Library Binding projects. enhancement Proposed change to current functionality.
Projects
None yet
Development

No branches or pull requests

4 participants