Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build an adaptive app with adaptive layout: Android Basics with Compose #13

Closed
tugceaktepe opened this issue Dec 7, 2022 · 0 comments
Closed

Comments

@tugceaktepe
Copy link

3. Implement adaptive content layout

In last step, Adjust back handling for list-detail view , I think it should be onBackButtonClicked property instead of onBackPressed. When we add onBackPressed project gives compilation error, because we used it as onBackButtonClicked above.
Probably, there is a naming confusion in the documentation.

val activity = LocalContext.current as Activity
        ReplyDetailsScreen(
            replyUiState = replyUiState,
            modifier = Modifier.weight(1f),
            onBackButtonClicked = { activity.finish() }. //or onBackPressed ? 
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants