-
Notifications
You must be signed in to change notification settings - Fork 43
Allo user to choose if he wants to consume insets wen using setOnApplyInsetsListener #89
Conversation
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 What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
I have a few lines adding extra tab that make build failed, any clue how to fix that? |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
Code looks good. Just need to run |
Thanks! |
I had a case today, when i use
setOnApplyInsetsListener
on a container to do custom stuff, and then wanted to useapplySystemWindowInsetsToMargin
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.