Скрыт инпут и оверлеи при рисовании на фото
All checks were successful
Android Kernel Build / build (push) Successful in 16h20m6s
All checks were successful
Android Kernel Build / build (push) Successful in 16h20m6s
This commit is contained in:
@@ -343,6 +343,7 @@ private fun SimpleFullscreenPhotoContent(
|
||||
localCaption = value
|
||||
}
|
||||
}
|
||||
val isDrawingModeActive = currentTool == EditorTool.DRAW
|
||||
|
||||
LaunchedEffect(imageUri, sourceThumbnail) {
|
||||
localCaption = caption
|
||||
@@ -394,6 +395,15 @@ private fun SimpleFullscreenPhotoContent(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(isDrawingModeActive) {
|
||||
if (isDrawingModeActive) {
|
||||
showEmojiPicker = false
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
focusManager.clearFocus(force = true)
|
||||
}
|
||||
}
|
||||
|
||||
fun hideKeyboard() {
|
||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
@@ -851,6 +861,7 @@ private fun SimpleFullscreenPhotoContent(
|
||||
.statusBarsPadding()
|
||||
.padding(horizontal = 4.dp, vertical = 8.dp)
|
||||
) {
|
||||
if (!isDrawingModeActive) {
|
||||
IconButton(
|
||||
onClick = { closeViewer() },
|
||||
modifier = Modifier.align(Alignment.CenterStart)
|
||||
@@ -863,6 +874,7 @@ private fun SimpleFullscreenPhotoContent(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AnimatedVisibility(
|
||||
visible = currentTool == EditorTool.DRAW && showColorPicker,
|
||||
@@ -990,6 +1002,11 @@ private fun SimpleFullscreenPhotoContent(
|
||||
}
|
||||
}
|
||||
|
||||
AnimatedVisibility(
|
||||
visible = !isDrawingModeActive,
|
||||
enter = fadeIn() + slideInVertically { it / 2 },
|
||||
exit = fadeOut() + slideOutVertically { it / 2 }
|
||||
) {
|
||||
Box(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
@@ -1108,7 +1125,9 @@ private fun SimpleFullscreenPhotoContent(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isDrawingModeActive) {
|
||||
AnimatedKeyboardTransition(
|
||||
coordinator = coordinator,
|
||||
showEmojiPicker = showEmojiPicker
|
||||
@@ -1125,3 +1144,4 @@ private fun SimpleFullscreenPhotoContent(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user