We should avoid assuming as much as we can the implementation code. Hardcoded references like R.id.someViewId assumes that this id exists in the implementation code. If the implementationdoes not declare this we will get a build failure, which we want to avoid.
You can copy this and replace the use of findViewById() with one of these find() methods. To use you just pass the viewId as a string like find("someViewId")
We should avoid assuming as much as we can the implementation code. Hardcoded references like R.id.someViewId assumes that this id exists in the implementation code. If the implementationdoes not declare this we will get a build failure, which we want to avoid.
I've been using code like this for this purpose
https://github.com/RedJocker/fixCinemaRoomManager/blob/fixWithSolution/Cinema%20Room%20Manager/stage1/src/test/java/org/hyperskill/cinema/abstraction/Extensions.kt
You can copy this and replace the use of findViewById() with one of these find() methods. To use you just pass the viewId as a string like find("someViewId")