Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Added extensions for padding and margins #51

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Added extensions for padding and margins #51

merged 1 commit into from
Apr 27, 2020

Conversation

mercuriy94
Copy link
Contributor

@mercuriy94 mercuriy94 commented Apr 22, 2020

Convenient extensions for applying insets, helping to avoid boilerplate code

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@mercuriy94
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@chrisbanes
Copy link
Owner

chrisbanes commented Apr 24, 2020

First up, thanks for the PR!

I'm currently thinking about holding off adding methods and functionality like this until we can use the new WindowInsets[Compat].Type values. The API is likely to change a lot once we can use Type.

applySystemWindowInsetsToPadding() then becomes applyInsetsToPadding(type: Int) and is much more flexible.

WDYT?

@chrisbanes
Copy link
Owner

Although we could merge this, and then deprecate later (in the re-write).

@mercuriy94
Copy link
Contributor Author

Hello, yes, I agree!
We will have to change api in the future.
But I think that now it makes sense to adopt pr in order to give the opportunity to use convenient extenssions in current projects.
In the future, when the api changes, a new version will be released, but for those who use the old version, support will remain.

Copy link
Owner

@chrisbanes chrisbanes left a comment

Choose a reason for hiding this comment

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

Yeah, sounds good to me.

@chrisbanes chrisbanes merged commit f058d7c into chrisbanes:master Apr 27, 2020
@mercuriy94 mercuriy94 deleted the applyInsetExtenssions branch April 28, 2020 08:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants