Fokussieren Sie sich nicht auf Talkback -Zugänglichkeit ModalbottomsheetLayout beim StartAndroid

Forum für diejenigen, die für Android programmieren
Anonymous
 Fokussieren Sie sich nicht auf Talkback -Zugänglichkeit ModalbottomsheetLayout beim Start

Post by Anonymous »

Erstellt ein modales Bodenblatt. Der Versuch, den Fokus zu bekommen, wenn Talkback beim Start des Bottom -Blatts eingeschaltet ist. Es funktioniert nicht. Auch beim Verschieben des Fokus konzentriert er sich auch auf die Komponenten, die hinter dem unteren Blatt zu sehen sind.

Code: Select all

@ExperimentalMaterialApi
@Composable
fun BottomSheetExample(
contents: @Composable () -> Unit
) {

val focusRequest = FocusRequester()

ModalBottomSheetLayout(
sheetState = rememberModalBottomSheetState(initialValue = ModalBottomSheetValue.Hidden),
sheetContent = {
Column {
Text(
modifier = Modifier
.fillMaxWidth()
.padding(start = 30.dp, end = 30.dp, top = 21.dp, bottom = 21.dp),
text = "Text Sample 1",
fontSize = 16.sp,
color = colorResource(id = R.color.johnstonBlack)
)
Text(
modifier = Modifier
.fillMaxWidth()
.padding(start = 30.dp, end = 30.dp, top = 21.dp, bottom = 21.dp)
.focusRequester(focusRequest)
.focusable(),
text = "Text Sample 2",
fontSize = 16.sp,
color = colorResource(id = R.color.johnstonBlack)
)
Text(
modifier = Modifier
.fillMaxWidth()
.padding(start = 30.dp, end = 30.dp, top = 21.dp, bottom = 21.dp),
text = "Text Sample 3",
fontSize = 16.sp,
color = colorResource(id = R.color.johnstonBlack)
)
}
},
content = {
contents()
}
)
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post