Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-12 16:01:54 +03:00
parent 92be94c5f6
commit 4b963c9e3f
2 changed files with 20 additions and 9 deletions

View file

@ -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)
}

View file

@ -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<ImmutableList<UserWalletItemUM>>(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(),