This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
var checked by remember { mutableStateOf(false)} | |
Checkbox(checked = checked, onCheckedChange = { | |
checked = it | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
class CheckBox(context: Context) : View(context) { | |
override fun performClick(): Boolean { | |
// Refactor: prevent the checkbox from toggling when clicked | |
// toggleCheck() | |
return super.performClick() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
@Composable | |
private fun HomeContentGrid(/* ... */) { | |
LazyVerticalGrid( | |
// Adapt number of columns wherein each column has at least 362.dp of space | |
columns = GridCells.Adaptive(362.dp), | |
modifier = modifier.fillMaxSize() | |
) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2023 Google LLC. | |
// SPDX-License-Identifier: Apache-2.0 | |
@Composable | |
fun EpisodePlayerWithBackground(/* ... */) { | |
// Initialize a FocusRequester object | |
val focusRequester = remember { FocusRequester() } | |
LaunchedEffect(Unit) { |
OlderNewer