V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  od66666666  ›  全部回复第 1 页 / 共 1 页
回复总数  3
光猫配置了组播 VLAN3996 ,连光猫的另一端也要把网卡配置到 3996 VLAN 才能拿到组播包,不在一个 VLAN 收不到
46 天前
回复了 magic3584 创建的主题 Android 请教个 Jetpack Compose 的布局问题
遇 size 不决,直接 onGloballyPositioned

Row(modifier = Modifier.fillMaxWidth()) {
val density = LocalDensity.current
var columnHeight by remember { mutableStateOf(0.dp) }
Box(
modifier = Modifier
.height(columnHeight)
.width(24.dp),
contentAlignment = Alignment.Center
) {
...
}
Spacer(Modifier.width(8.dp))
Column(modifier = Modifier
.onGloballyPositioned { layoutCoordinates ->
columnHeight =
with(density) { layoutCoordinates.size.height.toDp() }
}
.fillMaxWidth(),
verticalArrangement = Arrangement.spacedBy(8.dp)) {
...
}
}
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5577 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 02:35 · PVG 10:35 · LAX 19:35 · JFK 22:35
Developed with CodeLauncher
♥ Do have faith in what you're doing.