这是一个创建于 2123 天前的主题,其中的信息可能已经有所发展或是发生改变。
runBlocking {
delay(50)
val recyclerView = activityRule.activity.findViewById<RecyclerView>(android.R.id.list)!!
val viewHolder = recyclerView.findViewHolderForAdapterPosition(0)!!
val imageView = viewHolder.itemView.findViewById<ImageView>(R.id.story_image)!!
withTimeout(10000) {
while (true) {
if (imageView.visibility == View.VISIBLE && imageView.drawable != null) {
break // good
}
delay(50)
}
}
}
|
|
2
rumengzhenxing 2018-12-07 09:42:25 +08:00
imageview 显示 或者 imageview 里的 drawable 不为 null,跳出。
|