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

make the padding parameter order the same as in the Android Framework #536

Merged
merged 1 commit into from
Oct 18, 2018

Conversation

martinbonnin
Copy link
Contributor

see discussion in #535

@elihart
Copy link
Contributor

elihart commented Sep 10, 2018

I'm not sure why I ordered it the way I did, but I see your point about changing it.

I'm hesitant though because it won't be a compiler breaking change, it will just have different runtime behavior, so it would be really easy for people to forget to update.

@elihart
Copy link
Contributor

elihart commented Sep 13, 2018

I think we can include this with 3.0 - but I would also like to change the main Padding constructor for pixels to be Padding.px(...) to match the new dp and resource support. this will make it more likely that people update correctly too I think

@martinbonnin
Copy link
Contributor Author

Padding.px pushed. If we really wanted to make sure everyone updates their code, we could rename all these static methods:

  • Padding.fromPx(), Padding.fromDp()
  • or Padding.createPx(), Padding.createDp()

@elihart
Copy link
Contributor

elihart commented Sep 14, 2018

Thanks! I don't think we need to rename those too, they are fairly new and probably not used as widely.

I'll wait to merge this until we are ready for 3.0, and I'll make sure I headline the changelog with this breaking update.

Appreciate the contribution!

@elihart elihart merged commit 7f81c8b into airbnb:master Oct 18, 2018
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

Successfully merging this pull request may close these issues.

2 participants