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

Allo user to choose if he wants to consume insets wen using setOnApplyInsetsListener #89

Merged
merged 5 commits into from
Jan 21, 2021

Conversation

SamYStudiO
Copy link
Contributor

I had a case today, when i use setOnApplyInsetsListener on a container to do custom stuff, and then wanted to use applySystemWindowInsetsToMargin on a child view to have less boilerplater to apply simple insets, but of course this child view never got notified since insets were already consumed.
I guess allowing user to chose if he wants to consume should be ok.

@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.

@SamYStudiO
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@SamYStudiO
Copy link
Contributor Author

I have a few lines adding extra tab that make build failed, any clue how to fix that?

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.

Thanks for the change:

Can you run ./gradlew spotlessApply too?

@@ -34,7 +34,7 @@ import androidx.core.view.WindowInsetsCompat
)
)
fun View.doOnApplyWindowInsets(
f: (view: View, insets: WindowInsetsCompat, initialState: ViewState) -> Unit
f: (view: View, insets: WindowInsetsCompat, initialState: ViewState) -> WindowInsetsCompat
Copy link
Owner

Choose a reason for hiding this comment

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

Please revert this change, this changes the API signature and this function is deprecated.

@chrisbanes
Copy link
Owner

Code looks good. Just need to run ./gradlew spotlessApply to fix the code style

@chrisbanes chrisbanes merged commit 9b1eed5 into chrisbanes:main Jan 21, 2021
@chrisbanes
Copy link
Owner

Thanks!

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