Skip to content

Commit

Permalink
Boolti-337 feat: 공연 등록 키보드 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
mangbaam committed Nov 16, 2024
1 parent 0c9d869 commit 86daacf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<activity
android:name=".presentation.screen.MainActivity"
android:exported="true"
android:windowSoftInputMode="adjustResize"
android:theme="@style/Theme.Boolti">

<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.nexters.boolti.presentation.screen.showregistration

import android.annotation.SuppressLint
import android.app.ActionBar.LayoutParams
import android.net.Uri
import android.webkit.CookieManager
import android.webkit.ValueCallback
Expand All @@ -13,7 +12,9 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeOut
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -43,6 +44,7 @@ import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.launch
import timber.log.Timber

@OptIn(ExperimentalLayoutApi::class)
@SuppressLint("SetJavaScriptEnabled")
@Composable
fun ShowRegistrationScreen(
Expand Down Expand Up @@ -98,16 +100,13 @@ fun ShowRegistrationScreen(
Box(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding),
.padding(innerPadding)
.imePadding(),
) {
AndroidView(
modifier = Modifier.fillMaxSize(),
factory = { context ->
BtWebView(context).apply {
layoutParams = LayoutParams(
LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT,
)

setWebChromeClient(
launchActivity = { launcher.launch(arrayOf("image/*")) },
setFilePathCallback = { callback -> filePathCallback = callback },
Expand All @@ -133,7 +132,10 @@ fun ShowRegistrationScreen(
if (showExitDialog) {
BTDialog(
positiveButtonLabel = stringResource(R.string.btn_exit),
onClickPositiveButton = onClickBack,
onClickPositiveButton = {
showExitDialog = false
onClickBack()
},
onClickNegativeButton = { showExitDialog = false },
onDismiss = { showExitDialog = false },
) {
Expand Down

0 comments on commit 86daacf

Please sign in to comment.