question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request: Inset builder to have option to return the actual size

See original GitHub issue

I am using https://github.com/cashapp/contour in a project and it would be nice to have something like

val actualStatusBarsSize  = Insetter.builder().valueTop(statusBars =true).build().value

There are probably other uses cases outside of using contour where this could be helpful like

val navBarSize  = Insetter.builder().valueTop(navigationBars =true).build().value
view1.updatePadding(0,navBarSize,0,0)
view2.updatePadding(0,navBarSize,0,0)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisbanescommented, Feb 22, 2021

Although, at that point you wouldn’t need Insetter at all. You could just do:

ViewCompat.setOnApplyWindowInsetsListener(rootView) { v, insets ->
    val i = insets.getInsets(windowInsetTypesOf(navigationBars = true))
    view1.updatePadding(0, i.top, 0, 0)
    view2.updatePadding(0, i.top, 0, 0)
}
0reactions
CarlosEscocommented, Feb 22, 2021

thanks that actually worked out well

Read more comments on GitHub >

github_iconTop Results From Across the Web

InsetDrawable - Android Developers
This is used when a View needs a background that is smaller than the View's actual bounds. It can be defined in an...
Read more >
Insets.top , left, bottom, right all zero - java - Stack Overflow
To get an "exact size" program, you need to ask the window manager for a frame-less window, which can be done in Java....
Read more >
VBox (JavaFX 8) - Oracle Help Center
A vbox's unbounded maximum width and height are an indication to the parent that it may be resized beyond its preferred size to...
Read more >
Query examples | Objection.js
Note that you can chain debug() to any query to get the executed SQL ... The return value of the query method is...
Read more >
Using the Spark Connector - Snowflake Documentation
Required Context Options ... The Snowflake connector tries to translate all the filters requested by ... The runQuery method returns only TRUE or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found