agoda-com / Kakao

This repo is no longer supported. Please visit a https://github.com/KakaoCup/Kakao
Apache License 2.0
1.11k stars 102 forks source link

Fix Snackbar compatibility with androidx #148

Closed almozavr closed 5 years ago

almozavr commented 5 years ago

Material Snackbar has stable Ids we should rely on, otherwise it won't work (no AppcompatTextView would be found)

CLAassistant commented 5 years ago

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Unlimity commented 5 years ago

Thanks for the contribution!

Unlimity commented 5 years ago

@almozavr The test com.agoda.sample.TestActivityTest.testContentScreen has failed on your brach. Could you please run it locally and resolve the issue? It seems there are some problems with your changes. Thanks.

Vacxe commented 5 years ago

It's really old issue with resource overriding. Just need to use specific one.

Vacxe commented 5 years ago

@almozavr Thanks for contribution!

almozavr commented 5 years ago

@Unlimity solved the issue via withResourceName -> it seems we cannot use R.id.xxx for library projects, as application (sample) project would override those values, so when we call com.agoda.kakao.R.id.snackbar_text espresso actually looks for `com.agoda.sample:id/searchbar. Never knew this, it sounds so weird but it's how it works (at least for Espresso) ¯_(ツ)

Vacxe commented 5 years ago

Please don't use force push. I created fix for you improvement but u override it. Give me half hour for revert my changes l

Vacxe commented 5 years ago

@almozavr Using hardcoded strings instead of resource ids not is a good idea. Problem what u actually have is a really common issue.

almozavr commented 5 years ago

@Vacxe sorry :( my bad.

Thanks for a lightning response, btw!

Vacxe commented 5 years ago

@almozavr always welcome