【发布时间】:2021-10-10 05:05:52
【问题描述】:
我有一个Image,如下所示:
Image(
bitmap = ImageBitmap.imageResource(id = R.drawable.testimage),
contentDescription = null, // Only decorative image
contentScale = ContentScale.FillWidth,
modifier = Modifier
.requiredHeightIn(max = 250.dp)
.fillMaxWidth()
.semantics { testTag = "MyTestTag" },
)
在仪器测试期间,我想确保设置了正确的可绘制对象。我没有在SemanticsProperties 之类的类中找到任何可以实现这一点的方法来编写自定义匹配器。有人可以帮忙吗?
【问题讨论】:
标签: android kotlin android-jetpack android-jetpack-compose