Updated on 2026-08-14
This commit is contained in:
parent
4c3312186d
commit
2b5fcdf0f9
3 changed files with 6 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ import android.view.ViewGroup
|
|||
import androidx.compose.animation.Crossfade
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.viewModels
|
||||
import com.tangem.feature.swap.router.CustomTabsManager
|
||||
|
|
@ -26,7 +25,6 @@ class SwapFragment : Fragment() {
|
|||
private val viewModel by viewModels<SwapViewModel>()
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
||||
activity?.window?.let { WindowCompat.setDecorFitsSystemWindows(it, true) }
|
||||
viewModel.setRouter(
|
||||
SwapRouter(
|
||||
fragmentManager = WeakReference(parentFragmentManager),
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.feature.swap.ui
|
|||
import androidx.activity.compose.BackHandler
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.systemBarsPadding
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.ModalBottomSheetLayout
|
||||
|
|
@ -39,6 +40,7 @@ internal fun SwapScreen(stateHolder: SwapStateHolder) {
|
|||
|
||||
TangemTheme {
|
||||
ModalBottomSheetLayout(
|
||||
modifier = Modifier.systemBarsPadding(),
|
||||
sheetContent = {
|
||||
if (stateHolder.permissionState is SwapPermissionState.ReadyForRequest) {
|
||||
SwapPermissionBottomSheetContent(
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Box
|
|||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
|
|
@ -120,7 +121,9 @@ internal fun SwapScreenContent(state: SwapStateHolder, onPermissionWarningClick:
|
|||
|
||||
AnimatedVisibility(
|
||||
visible = keyboard is Keyboard.Opened,
|
||||
modifier = Modifier.align(Alignment.BottomCenter),
|
||||
modifier = Modifier
|
||||
.imePadding()
|
||||
.align(Alignment.BottomCenter),
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(id = R.string.send_max_amount_label),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue