diff --git a/core/ui/src/main/java/com/tangem/core/ui/components/FullScreen.kt b/core/ui/src/main/java/com/tangem/core/ui/components/FullScreen.kt index 965c9c4cf0..fff3c42836 100644 --- a/core/ui/src/main/java/com/tangem/core/ui/components/FullScreen.kt +++ b/core/ui/src/main/java/com/tangem/core/ui/components/FullScreen.kt @@ -3,6 +3,7 @@ package com.tangem.core.ui.components import android.annotation.SuppressLint import android.content.Context import android.graphics.PixelFormat +import android.os.Build import android.view.KeyEvent import android.view.View import android.view.WindowManager @@ -100,8 +101,12 @@ private class FullScreenLayout( width = WindowManager.LayoutParams.MATCH_PARENT height = WindowManager.LayoutParams.MATCH_PARENT format = PixelFormat.TRANSLUCENT - flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS or - WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS + + if (focusable && Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) { + softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE + } else { + flags = WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS + } } fun show() { @@ -142,7 +147,7 @@ private class FullScreenLayout( fun dispose() { dismiss() - setViewTreeSavedStateRegistryOwner(null) + setViewTreeLifecycleOwner(null) setViewTreeSavedStateRegistryOwner(null) setViewTreeViewModelStoreOwner(null) } diff --git a/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt b/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt index 7e9e671696..d47a0f2311 100644 --- a/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt +++ b/features/welcome/impl/src/main/kotlin/com/tangem/features/welcome/impl/ui/WelcomeSelectWallet.kt @@ -15,6 +15,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.vector.ImageVector +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp import com.tangem.common.ui.userwallet.UserWalletItem @@ -43,10 +44,9 @@ internal fun AnimatedContentScope.WelcomeSelectWallet(state: WelcomeUM.SelectWal .statusBarsPadding(), ) { TopBar(state) - TitleText() - SpacerH12() var actualWallets by remember { mutableStateOf>(persistentListOf()) } + val bottomBarHeight = with(LocalDensity.current) { WindowInsets.systemBars.getBottom(this).toDp() } Box(modifier = Modifier.weight(1f)) { LazyColumn( @@ -58,19 +58,26 @@ internal fun AnimatedContentScope.WelcomeSelectWallet(state: WelcomeUM.SelectWal ) + fadeIn(tween(delayMillis = 300)), exit = fadeOut(), ) - .fillMaxHeight() - .padding(horizontal = 16.dp), + .fillMaxHeight(), verticalArrangement = Arrangement.spacedBy(8.dp), ) { + item { + TitleText(modifier = Modifier.padding(bottom = 4.dp)) + } itemsIndexed(actualWallets) { index, walletState -> UserWalletItem( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .padding(horizontal = 16.dp) + .fillMaxWidth(), state = walletState, blockColors = TangemBlockCardColors.copy( containerColor = TangemTheme.colors.field.primary, ), ) } + item { + SpacerH(128.dp + bottomBarHeight) + } } BottomFade(modifier = Modifier.align(Alignment.BottomCenter)) @@ -115,7 +122,6 @@ private fun AnimatedContentScope.TopBar(state: WelcomeUM.SelectWallet, modifier: ) .padding( top = 16.dp, - bottom = 16.dp, start = 16.dp, ) .fillMaxWidth(),