Скрыт инпут и оверлеи при рисовании на фото
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
|
localCaption = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
val isDrawingModeActive = currentTool == EditorTool.DRAW
|
||||||
|
|
||||||
LaunchedEffect(imageUri, sourceThumbnail) {
|
LaunchedEffect(imageUri, sourceThumbnail) {
|
||||||
localCaption = caption
|
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() {
|
fun hideKeyboard() {
|
||||||
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
imm.hideSoftInputFromWindow(view.windowToken, 0)
|
||||||
@@ -851,6 +861,7 @@ private fun SimpleFullscreenPhotoContent(
|
|||||||
.statusBarsPadding()
|
.statusBarsPadding()
|
||||||
.padding(horizontal = 4.dp, vertical = 8.dp)
|
.padding(horizontal = 4.dp, vertical = 8.dp)
|
||||||
) {
|
) {
|
||||||
|
if (!isDrawingModeActive) {
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = { closeViewer() },
|
onClick = { closeViewer() },
|
||||||
modifier = Modifier.align(Alignment.CenterStart)
|
modifier = Modifier.align(Alignment.CenterStart)
|
||||||
@@ -863,6 +874,7 @@ private fun SimpleFullscreenPhotoContent(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = currentTool == EditorTool.DRAW && showColorPicker,
|
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(
|
Box(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier.fillMaxWidth()
|
Modifier.fillMaxWidth()
|
||||||
@@ -1108,7 +1125,9 @@ private fun SimpleFullscreenPhotoContent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isDrawingModeActive) {
|
||||||
AnimatedKeyboardTransition(
|
AnimatedKeyboardTransition(
|
||||||
coordinator = coordinator,
|
coordinator = coordinator,
|
||||||
showEmojiPicker = showEmojiPicker
|
showEmojiPicker = showEmojiPicker
|
||||||
@@ -1124,4 +1143,5 @@ private fun SimpleFullscreenPhotoContent(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user