0

In Kotlin Jetpack ComposeView: Keyboard is overlapping OutlinedTextField in devices with smaller screens . Device details: Name : Nokia 6.1 Android version: 10 Model : TA-1089 password field overlapping gif link here below is the code kotlin and manifest code used

                            value = passwordText.value!!,
                            onValueChange = {
                                passwordText.value = it
                                enableLogin =
                                    studentIDText.value.isNullOrEmpty()
                                        .not() && passwordText.value.isNullOrEmpty()
                                        .not()
                            },
                            modifier = Modifier
                                .fillMaxWidth()
                                .padding(horizontal = 8.dp)
                                .border(
                                    border = BorderStroke(
                                        1.dp,
                                        colorResource(id = R.color.light_white)
                                    ),
                                    shape = RoundedCornerShape(5.dp)
                                ),
                            visualTransformation = PasswordVisualTransformation(),
                            keyboardOptions = KeyboardOptions(
                                keyboardType = KeyboardType.Password,
                                imeAction = ImeAction.Done
                            ),
                            keyboardActions = KeyboardActions(
                                onDone = { focusManager.clearFocus() }),
                            placeholder = {
                                SBText(
                                    text = stringResource(id = R.string.enter_password),
                                    size = 16.sp,
                                    color = colorResource(id = R.color.light_white),
                                    font = SBFont.WorksansRegular,
                                    lineHeight = 16.sp,
                                )
                            },
                            colors = TextFieldDefaults.outlinedTextFieldColors(
                                textColor = colorResource(id = R.color.grey),
                                cursorColor = colorResource(id = R.color.grey),
                                focusedBorderColor = colorResource(id = R.color.light_white),
                                unfocusedBorderColor = colorResource(id = R.color.light_white)
                            ),
                            maxLines = 1,
                            singleLine = true
                        )
            android:name=".ui.SBActivity"
            android:configChanges="orientation|screenSize"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.SB.NoActionBar"
            android:showWhenLocked="false"
            android:exported="true"
            android:windowSoftInputMode="stateAlwaysHidden|adjustResize|adjustPan"
            android:taskAffinity="">

0 Answers0