gpt4 book ai didi

android - Espresso :Test swipe to delete item of Recyclerview inside ViewPager

转载 作者:行者123 更新时间:2023-11-28 21:37:38 32 4
gpt4 key购买 nike

我想测试向左滑动删除,但是它触发了 ViewPager 滑动操作,如何解决?

 onView(withId(R.id.orders)).perform(
RecyclerViewActions.actionOnItemAtPosition<ProductItemViewHolder>(
1,
swipeLeft()
)
)

最佳答案

测试这个:

    onView(withId(R.id.rv_recyclerview)).perform(
RecyclerViewActions.actionOnItemAtPosition(0, new GeneralSwipeAction(
Swipe.SLOW, GeneralLocation.BOTTOM_RIGHT, GeneralLocation.BOTTOM_LEFT,
Press.FINGER)));

关于android - Espresso :Test swipe to delete item of Recyclerview inside ViewPager,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56578699/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com