Fixed
Status Update
Comments
de...@decavoid.com <de...@decavoid.com> #2
Any news about this issue?
ro...@cosmicrealms.com <ro...@cosmicrealms.com> #3
Any news about this issue?
ro...@cosmicrealms.com <ro...@cosmicrealms.com> #4
I have the same issue.
Jetpack Compose version: 1.0.2
My code:
@ExperimentalComposeUiApi
@Composable
fun Code(modifier: Modifier = Modifier, onCodeInputted: (String) -> Unit = {}) {
val passcodeLength = 6
val codeArray = remember {
Array(passcodeLength) {
mutableStateOf(TextFieldValue(text = ""))
}
}
val focusRequesters = remember {
(0 until passcodeLength).map { FocusRequester() }
}
Row(modifier = modifier) {
repeat(passcodeLength) { textFieldIndex ->
OutlinedTextField(
modifier = Modifier
.weight(1f)
.onPreviewKeyEvent {
if (it.type == KeyEventType.KeyDown && it.key == Key.Backspace &&
textFieldIndex != 0 && codeArray[textFieldIndex].value.text.isEmpty()
) {
codeArray[textFieldIndex - 1].value =
codeArray[textFieldIndex - 1].value.copy(text = "")
focusRequesters[textFieldIndex - 1].requestFocus()
}
false
}
.focusRequester(focusRequesters[textFieldIndex]),
value = codeArray[textFieldIndex].value,
textStyle = LocalTextStyle.current.copy(
textAlign = TextAlign.Center
),
singleLine = true,
keyboardOptions = KeyboardOptions.Default.copy(
keyboardType = KeyboardType.Number,
imeAction = ImeAction.Next
),
onValueChange = { newTextFieldValue ->
val newString = newTextFieldValue.text
if (newString.isDigitsOnly() && codeArray[textFieldIndex].value.text != newString) {
codeArray[textFieldIndex].value =
if (newString.length > 1) {
newTextFieldValue.copy(text = newString[0].toString())
} else newTextFieldValue
if (newString != "") {
val nextEmpty =
codeArray.indices.firstOrNull { codeArray[it].value.text == "" }
if (nextEmpty != null) {
focusRequesters[nextEmpty].requestFocus()
} else {
onCodeInputted(codeArray.joinToString(separator = "") { it.value.text })
}
}
}
}
)
if (textFieldIndex != passcodeLength - 1) {
Spacer(Modifier.width(10.dp))
}
}
}
}
[Deleted User] <[Deleted User]> #5
Any info about this issue? :)
lo...@gmail.com <lo...@gmail.com> #6
Does any hacky workaround exists?
ro...@cosmicrealms.com <ro...@cosmicrealms.com> #7
Still nothing?
ni...@fanpagekarma.com <ni...@fanpagekarma.com> #8
any updated for this issue? or any work around?
cw...@riotgames.com <cw...@riotgames.com> #10
Same issue
ro...@cosmicrealms.com <ro...@cosmicrealms.com> #11
Same issue
st...@gmail.com <st...@gmail.com> #12
Same issue
ar...@google.com <ar...@google.com> #13
I have created an article on a possible workaround, hope it helps.
https://chetangupta.net/keyboard-switch-bug/
Description
- Description
it looks like 'publishedAfter' doesn't work
- API request with parameters used (DO NOT include your credential)
{"part":"snippet","channelId":"UCw1DsweY9b2AKGjV4kGJP1A","order":"date","type":"video","maxResults":50,"publishedAfter":"2019-03-15T14:39:47.000Z"}
- Result (copy and paste a JSON response you received)
{"kind":"youtube#searchListResponse","etag":"\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/2hAOK14MgKtFIyIQ0OQfBeh0z24\"","nextPageToken":"CDIQAA","regionCode":"KR","pageInfo":{"totalResults":335,"resultsPerPage":50},"items":[{"kind":"youtube#searchResult","etag":"\"XpPGQXPnxQJhLgs6enD_n8JR4Qk/2Eab_DGrL8pQ9Qlq_MDrCA895XI\"","id":{"kind":"youtube#video","videoId":"Kch_gOKSECQ"},"snippet":{"publishedAt":"2019-02-02T08:59:43.000Z","channelId":"UCw1DsweY9b2AKGjV4kGJP1A","title":"LCK 캐슬 : 서부로 가야하는 그들의 이야기 (김동준, 이현우 주연)","description":"풀 경기 및 라이브는 아래 링크에서 확인하세요. Facebook :
- Expected result
There should be no videos were published before publishedAfter param.
- Is it 100% reproducible?
- Reproducible API explorer link