KakaoCup / Kakao

Nice and simple DSL for Espresso in Kotlin
https://kakaocup.github.io/Kakao/
Apache License 2.0
325 stars 28 forks source link

Add ability to get Matcher of KBaseView #44

Closed tevjef closed 2 years ago

tevjef commented 2 years ago

Relevant Code:

    private val header = KTextView { withText(R.string.text) }
    private val recyclerView = KRecyclerView({ withId(R.id.recyclerView) }, itemTypeBuilder = {})

    fun scrollToTextView() {
       // I want to do something like this
       recyclerView.scrollTo(header.getViewMatchers()) 
       // Potentially to have an extension func to do this 
       recyclerView.scrollTo(header)
       // As it currently stands, it seems like I have to redefine my matchers.
       recyclerView.scrollTo { withText(R.string.text) } 
    }

In short I would like access to the matchers all KBaseView was initialized with.

Vacxe commented 2 years ago

@tevjef hey mate! Probably you can achieve the same behaviour with header.scrollTo(). Did you try that?

Vacxe commented 2 years ago

Inactivity close