How to get item by index from some views' list in VerticalGridView?
Closed this issue · 2 comments
automaticqa commented
Unlimity commented
Hi there!
Well, your GridView is derived form RecyclerView, right?
That means, that you can use KRecyclerView
to access items.
When you define an item class for KRecyclerView
you have to specify constructor with argument of type Matcher
. That matcher is matching to root view of the item. In that case you can use this matcher to access the root view itself:
class MyRecyclerItem(parent: Matcher<View>) : KRecyclerItem<MyRecyclerItem>(parent) {
val root = KView { withMatcher(parent) }
}
Cheers!
automaticqa commented
Thanks a lot!