when I try to use databinding it generates `androi...
# android
k
when I try to use databinding it generates
android.support.constraint.ConstraintLayout
instead of
androidx
equivalent
r
if your using databinding, why would you be using android-kotlin-extenstions
thats what its suppose to do
k
It is a java + kotlin project
r
yea but what is the point in using both?
i mean databinding , and the extentsions
k
Well even though i remove extentions then also it should genetate classes with imports according to androidx namespace
For constraint layout
r
gotcha, although, im not sure what you mean.. If your using kotlin extentsions , than it goes by ID. its not possible for you to just type an id and than it auto import an a view group
unless your id is ConstraintLayout
lol
although I wonder, if Databinding gives you the same capability🤔. can’t remember
k
@rkeazor using databinging fir generating java class only... With daggr
r
🤔
i have no idea what your talking about😂 what does dagger have to do with databinding.
k
No prob let it be
r
hehe just playing dude. if you post some sample code maybe it will give more context..
k
i have no idea what your talking about😂 what does dagger have to do with databinding.
Sorry it is not.... mixed issues of two different projects maybe should take the day off
g
Android Extensions is not replacement for Databinding library. Binding library can do much-much more than just search for views by id.
k
@gildor can you explain the behavior in the main issue
g
Actually really interesting issue. Do you use androidx.constraintlayout, but binding generates android.support? Do you use jettifier? Are you sure that it's not a problem of some of your binding adapters? I just don't think that binding library knows anything about Constraint Layout, maybe some bug of jettifier with code generation
If you have reproduction steps, please let me know, I would like to vote up this issue
I would like, but our app with bindings is not use androidx yet, but another app already on androidx without issues, but no bindings there
k
actually i am not familiar with the data binding library I am trying to implement this codelab https://github.com/googlecodelabs/android-build-an-app-architecture-components
I bumped up the dependencies all the way to support AS 3.2-alpha17
and refactored to androidX
please try and let me know @gildor
also it is java and trying to convert to kotlin ass well 🙂
r
Ohhh
wait a sec
are you trying to use extensions in Java?
k
which extensions?
r
androidx
k
yes
r
thats not possible , i believe
k
but androidx and ktx are two different things I guess you are mixing these two
androidx can be used with both but ktx cannot
r
‘kotlin-android-extensions’
k
and thats also a different thing
r
what
lol
r
my bad i see , your saying that when your trying to import the constraint layout , it doesn’t show
as within the new package structure
k
yes and btw android kotlin extention is
kotlinx
and not
androidx
r
are you able to type the import in manurally
k
yes but is says don't change the generated classes
r
Did you do Refactor -> Refactor android x , in Android studio?
k
Yes
r
do you see, the constraint layout dependency when you do that?
it should give you the option to migrate.. If your still having a issue after that . than do file a bug report. its still fairly new
k
It chanded the dependencies throughout the project but not in the generated classes
r
just do a clean -> rebuild
k
Did that
r
generated classes from Databinding?
yea just file a report. of what your going thru
k
Right
r
also , make sure the support dependency isn’t in your build.gradle
g
@kartikpatodi do you have own fork, refactored to androidx that I could try and reproduce your problem?
k
wait
g
@kartikpatodi No issue with androidx and constraint layouts. Just fix package name in layout xml
k
Can you pr the changes if you have a working version
g
This is PR with fix
k
Thanks for your time
g
See, DataBinding generate code from your layout file, so just uses packages from layout
also, androidx.constraintlayout 1.1.1 changed package name from
androidx.constraintlayout.widget
to
androidx.constraintlayout
k
Oh I see thanks