Giter VIP home page Giter VIP logo

Comments (7)

keyboardseokmin avatar keyboardseokmin commented on May 29, 2024 2

BottomSheetBehaviorProperties 의 state 를 Expanded 로 지정하여 해결하였습니다.

from bottomsheetdialog-compose.

keyboardseokmin avatar keyboardseokmin commented on May 29, 2024

정상출력 : https://drive.google.com/file/d/1B7ZpNuIhAuHD3FiAraZWWyA9aR_lMsax/view?usp=sharing
버그발생 : https://drive.google.com/file/d/1Dbe7q0dExllLslYW4VG5zMnSdTOA5j0G/view?usp=sharing

from bottomsheetdialog-compose.

workspace avatar workspace commented on May 29, 2024

image
Android 9 테스트 기기에서 샘플앱 기준 정상 동작하는 것 같습니다.

BottomSheetDialog를 사용 시 기본값과 다르게 property를 설정하신 부분이 있다면 공유해주실 수 있을까요?
BottomSheetDialog content Composable에서 navigationBarsPadding modifier를 사용하고 계신지도 궁금합니다.

from bottomsheetdialog-compose.

workspace avatar workspace commented on May 29, 2024

사용 중이신 compose 버전과 라이브러리 버전도 부탁드립니다!

from bottomsheetdialog-compose.

keyboardseokmin avatar keyboardseokmin commented on May 29, 2024

navigationBarsPadding modifier 는 사용하고 있지 않습니다.
사용중인 compose 버전은 1.6.1 입니다 :)

from bottomsheetdialog-compose.

keyboardseokmin avatar keyboardseokmin commented on May 29, 2024
BottomSheetDialog(
    onDismissRequest = {},
    properties = BottomSheetDialogProperties(
        dismissOnBackPress = false,
        dismissOnClickOutside = false,
        dismissWithAnimation = false,
        navigationBarProperties = NavigationBarProperties(
            color = Color.White
        ),
        behaviorProperties = BottomSheetBehaviorProperties(
            isFitToContents = true,
            isDraggable = false,
            isHideable = false,
        )
    )
) {
    Column(
        horizontalAlignment = Alignment.CenterHorizontally,
        modifier = Modifier
            .fillMaxWidth()
            .background(
                color = Color.White,
                shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp)
            )
    ) {
        Spacer(modifier = Modifier.height(51.dp))
        Text(
            text = stringResource(id = R.string.permission_message_require),
            style = MaterialTheme.typography.permissionMainTop,
            textAlign = TextAlign.Center
        )
        Spacer(modifier = Modifier.height(39.dp))
        Row(
            modifier = Modifier
                .width(236.dp)
                .height(50.dp)
                .padding(start = 3.dp, top = 6.dp)
        ) {
            Column {
                Spacer(modifier = Modifier.height(2.dp))
                Image(
                    painter = painterResource(id = R.drawable.marker),
                    contentDescription = null,
                    modifier = Modifier.size(24.dp)
                )
            }
            Spacer(modifier = Modifier.width(13.dp))
            Column {
                Text(
                    text = stringResource(id = R.string.permission_location),
                    style = MaterialTheme.typography.permissionSub
                )
                Spacer(modifier = Modifier.height(4.dp))
                Text(
                    text = stringResource(id = R.string.permission_location_sub),
                    style = MaterialTheme.typography.permissionDetail
                )
            }
        }
        Spacer(modifier = Modifier.height(13.dp))
        Row(
            modifier = Modifier
                .width(236.dp)
                .height(50.dp)
                .padding(start = 3.dp, top = 6.dp)
        ) {
            Column {
                Spacer(modifier = Modifier.height(2.dp))
                Image(
                    painter = painterResource(id = R.drawable.call),
                    contentDescription = null,
                    modifier = Modifier.size(24.dp)
                )
            }
            Spacer(modifier = Modifier.width(13.dp))
            Column {
                Text(
                    text = stringResource(id = R.string.permission_number),
                    style = MaterialTheme.typography.permissionSub
                )
                Spacer(modifier = Modifier.height(4.dp))
                Text(
                    text = stringResource(id = R.string.permission_number_sub),
                    style = MaterialTheme.typography.permissionDetail
                )
            }
        }
        Spacer(modifier = Modifier.height(42.dp))
        Text(
            text = stringResource(id = R.string.permission_message_ask),
            style = MaterialTheme.typography.permissionMainBottom,
            textAlign = TextAlign.Center
        )
        Spacer(modifier = Modifier.height(59.dp))
        Button(
            onClick = onConfirm,
            colors = ButtonDefaults.buttonColors(backgroundColor = MaterialTheme.colors.buttonBlue),
            shape = RoundedCornerShape(10.dp),
            modifier = Modifier
                .width(328.dp)
                .height(54.dp)
        ) {
            Text(
                text = stringResource(id = R.string.button_confirm),
                style = MaterialTheme.typography.buttonConfirm,
                textAlign = TextAlign.Center
            )
        }
        Spacer(modifier = Modifier.height(40.dp))
    }
}

from bottomsheetdialog-compose.

keyboardseokmin avatar keyboardseokmin commented on May 29, 2024

다시 테스트 해본 결과 네비게이션바와 겹치는게 아니라 갤럭시S9 Android 9 버전 에서 content Composable의 최하단 Spacer가 동작하지 않는것 이였습니다. 현재 추측으로는 BottomSheetDialog 의 최대 높이가 화면의 70% 정도로 정해져 있어서 그 아래 부분은 잘리는것 같습니다.

from bottomsheetdialog-compose.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.