聊天界面键盘底部Padding动画,添加默认边距

This commit is contained in:
2024-09-24 04:50:52 +08:00
parent c21ef36ecb
commit 115673b2a6

View File

@@ -337,7 +337,7 @@ fun ChatInput(
var isKeyboardOpen by remember { mutableStateOf(false) } var isKeyboardOpen by remember { mutableStateOf(false) }
var text by remember { mutableStateOf("") } var text by remember { mutableStateOf("") }
val inputBarHeight by animateDpAsState( val inputBarHeight by animateDpAsState(
targetValue = if (isKeyboardOpen) 8.dp else navigationBarHeight, targetValue = if (isKeyboardOpen) 8.dp else (navigationBarHeight + 8.dp),
animationSpec = tween(durationMillis = 300), label = "" animationSpec = tween(durationMillis = 300), label = ""
) )