Status Update
Comments
gg...@google.com <gg...@google.com> #2
this would be nice but given Compose and all other priorities, we are not planning to make any big investments in data binding (support KSP is a very big task).
ra...@gmail.com <ra...@gmail.com> #3
Makes sense. And is there any way to trigger data binding without kapt plugin, assuming there are no custom binding adapters in given module?
gg...@google.com <gg...@google.com> #4
unfortunately no. data binding still needs to be able to read your code and annotation processing is the only API that allows us to do it :(
gg...@google.com <gg...@google.com> #5
It's a very disappointing decision for many projects who heavily depend on data binding, which will never be able to get rid of all bindings code and especially rewrite all UI to Compose.
It means that bindings are essentially deprecated
ni...@gmail.com <ni...@gmail.com> #6
It does not mean data binding is deprecated unless KAPT is deprecated (if that happens, we would need to support KSP).Unfortunately, moving data binding to KSP is a large order so it makes more sense to keep focusing on KAPT than rewrite data binding.
We might re-consider this in the future based on KSP becoming stable, Compose adoption and KAPT stability but it is very unlikely to happen.
dy...@gmail.com <dy...@gmail.com> #8
Unfortunately this is still a NO for 2022 planning due to reasons mentioned in #2.
[Deleted User] <[Deleted User]> #9
kapt seems no longer adding new feature
kapt is in maintenance mode. We are keeping it up-to-date with recent Kotlin and Java releases but have no plans to implement new features. Please use the Kotlin Symbol Processing API (KSP) for annotation processing. See the list of libraries supported by KSP.
So this mean databinding will also deprecated or will be support KSP?
co...@gmail.com <co...@gmail.com> #10
We don't plan to support KSP nor recommend data binding usage at this stage since compose is our recommended UI solution.
ma...@gmail.com <ma...@gmail.com> #11
We don't plan to support KSP nor recommend data binding usage at this stage since compose is our recommended UI solution.
I have been waited this answer in several years.
Because it is an important basis to convince co-workers and for determining the technology stack of an app.
ma...@gmail.com <ma...@gmail.com> #12
Databinding is in maintenance mode as well.
We don't plan to support KSP nor recommend data binding usage at this stage since compose is our recommended UI solution.
A bit of a tangent here, but what about ViewBinding? Will that one stay going strong or will it fade along with DataBinding?
ma...@gmail.com <ma...@gmail.com> #13
So if you are using Views, ViewBinding will keep working.
It is the same for Data Binding as well though. The main difference is that if KAPT stops working, DataBinding will stop working whereas ViewBinding will keep working. Hopefully, any such situation will be far enough that no-one will care and everyone will be using Compose :)
Description
Version used: 3.0.1
What steps will reproduce the problem?
1. Put an AppCompatTextView in your UI with android:textAllCaps="true" and android:text="Low Stock" in your XML (I'm using android:id="@+id/lowStockTV")
2. Launch your activity through a Test. AppCompatTextView will be shown as "LOW STOCK"
3. Check that that view has text with Espresso in the following way:
onView(withId(R.id.lowStockTV))
.check(
matches(withText("LOW STOCK"))
)
How are you running your tests (via Android Studio, Gradle, adb, etc.)? Android Studio
What is the expected output?
The expected output is obtaining a valid ViewInteraction with no throw (AssertionFailedWithCausedError)
What do you see instead?
AssertionFailedWithCausedError with message:
'with text: is "LOW STOCK"' doesn't match the selected view.
Expected: with text: is "LOW STOCK"
Got: "AppCompatTextView{id=2131296406, res-name=lowStockTV, visibility=VISIBLE, width=1002, height=57, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@5155c10, tag=null, root-is-layout-requested=false, has-input-connection=false, x=39.0, y=39.0, text=Low Stock, input-type=0, ime-target=false, has-links=false}"
if I use:
onView(withId(R.id.lowStockTV))
.check(
matches(withText("Low Stock"))
)
it works perfectly, I get my ViewInteraction, but that's not why I see in my UI