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

[NO ISSUE] Migrated Sample App main activity to Jetpack Compose #348

Merged
merged 8 commits into from
May 18, 2022

Conversation

ferranpons
Copy link
Member

@ferranpons ferranpons commented May 13, 2022

ISSUE

No issue

Description

In Order to migrate all the library to Jetpack Compose we started with adding Compose to the project and migrating the sample activity layout.

Screenshots

Before After

Mandatory GIF

mandatory

@ferranpons ferranpons added the wip label May 13, 2022
@ferranpons ferranpons self-assigned this May 13, 2022
@auto-assign auto-assign bot requested review from gerardpedreny and jlquintana May 13, 2022 10:47
@ferranpons ferranpons added review and removed wip labels May 13, 2022
val context = LocalContext.current

Column(Modifier.padding(16.dp, 0.dp, 16.dp, 0.dp).fillMaxSize()) {
Spacer(modifier = Modifier.size(20.dp))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could replace all the Spacer(modifier = Modifier.size(20.dp)) with a parameter in the parent Column:

Column(
  Modifier
    .padding(horizontal = 16.dp)
    .fillMaxSize(),
  verticalArrangement = Arrangement.spacedBy(20.dp)
) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your suggestion!

Comment on lines +223 to +227
Button(
colors = ButtonDefaults.buttonColors(
backgroundColor = Color(context.resources.getColor(R.color.leku_app_blue)),
contentColor = Color.White
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok for now, but you should use Theme color when you create the theme.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! The next step is to create the Theme for the picker activity :)

@ferranpons ferranpons merged commit 4c7e7d5 into master May 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the NO-ISSUE-migration-to-jetpack-compose branch May 18, 2022 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants