enpassio / Databinding

Various examples on databinding which can help not only understand how to get started with it but it also shows how this can be used in complex and real use cases
Apache License 2.0
26 stars 14 forks source link

update gradle, add credits to readme, eliminate assertNotNull, eras… #18

Closed OyaCanli closed 5 years ago

OyaCanli commented 5 years ago

…e unused binding adapter, rename utility class etc

rajtheinnovator commented 5 years ago

@OyaCanli firs thing is that I see the app is not building properly because some files seems to be missing: image

OyaCanli commented 5 years ago

@rajtheinnovator I checkout this branch again and it works fine on my side. If it is only the databinding error, may be it can be fixed with a clean-rebuild. Did you already try that?

rajtheinnovator commented 5 years ago

@OyaCanli I've done that but it didn't help. Maybe you can check once more by cloning your project from your Github fork in a new directory on your machine and see how that goes

rajtheinnovator commented 5 years ago

@OyaCanli I myself tried cloning the branch again and this time it seems to work just fine. Probably an issue with build or cloning it was. Please ignore my previous comment. We're good to go with merge.

OyaCanli commented 5 years ago

Yeap, I have just tried to download from remote and it worked fine. Databinding can sometimes create build errors. Especially, with our project structure, even if we switch branches, I see it keeps build folders of other branches. And may be you already know but the clean from the top menu doesn't seem to clean subfolders, so we need to clean from the gradle menu.

rajtheinnovator commented 5 years ago

@OyaCanli yeah. That's true. Most probably a build issue I think. And now that it looks all good without any doubt remaining, let's merge this PR. Thanks for the extra effort :+1: :grinning:

OyaCanli commented 5 years ago

@rajtheinnovator I figured this out: it is the auto-converter who converts the recyclerview adapter with internal constructor, because the java version has a package-private constructor. I had made it like this because lint was showing "access could be weaker" warning, since adapter is in the same package with the fragment that uses it. Anyway, since kotlin doesn't have package private it converted it to internal. I don't think it has much of an importance. We can make the class internal or we can keep it public..